This class performs 2D image rendering, such as showing multiple 2D fitting or roi images based on user's selection. Attributes ---------- img_data : dict dict of 2D array fig : object matplotlib Figure file_name : str stat_dict : dict determ
| 23 | |
| 24 | |
| 25 | class DrawImageAdvanced(Atom): |
| 26 | """ |
| 27 | This class performs 2D image rendering, such as showing multiple |
| 28 | 2D fitting or roi images based on user's selection. |
| 29 | |
| 30 | Attributes |
| 31 | ---------- |
| 32 | img_data : dict |
| 33 | dict of 2D array |
| 34 | fig : object |
| 35 | matplotlib Figure |
| 36 | file_name : str |
| 37 | stat_dict : dict |
| 38 | determine which image to show |
| 39 | data_opt : int |
| 40 | index to show which data is chosen to plot |
| 41 | dict_to_plot : dict |
| 42 | selected data dict to plot, i.e., fitting data or roi is selected |
| 43 | scale_opt : str |
| 44 | linear or log plot |
| 45 | color_opt : str |
| 46 | orange or gray plot |
| 47 | scaler_norm_dict : dict |
| 48 | scaler normalization data, from img_dict |
| 49 | scaler_items : list |
| 50 | keys of scaler_norm_dict |
| 51 | scaler_name_index : int |
| 52 | index to select on GUI level |
| 53 | scaler_data : None or numpy |
| 54 | selected scaler data |
| 55 | x_pos : list |
| 56 | define data range in horizontal direction |
| 57 | y_pos : list |
| 58 | define data range in vertical direction |
| 59 | pixel_or_pos : int |
| 60 | index to choose plot with pixel (== 0) or with positions (== 1) |
| 61 | grid_interpolate: bool |
| 62 | choose to interpolate 2D image in terms of x,y or not |
| 63 | limit_dict : Dict |
| 64 | save low and high limit for image scaling |
| 65 | """ |
| 66 | |
| 67 | # Reference to FileIOMOdel |
| 68 | io_model = Typed(object) |
| 69 | |
| 70 | fig = Typed(Figure) |
| 71 | stat_dict = Dict() # The value (bool) determines if the map (name is the key) is shown |
| 72 | data_opt = Int(0) |
| 73 | dict_to_plot = Dict() |
| 74 | items_previous_selected = List() |
| 75 | |
| 76 | scale_opt = Str("Linear") |
| 77 | color_opt = Str("viridis") |
| 78 | img_title = Str() |
| 79 | |
| 80 | scaler_norm_dict = Dict() |
| 81 | scaler_items = List() |
| 82 | scaler_name_index = Int() |