This class performs all the required line plots. Attributes ---------- data : array Experimental data _fit : class object Figure object from matplotlib _ax : class object Axis object from matplotlib _canvas : class object Canvas object fr
| 68 | |
| 69 | |
| 70 | class LinePlotModel(Atom): |
| 71 | """ |
| 72 | This class performs all the required line plots. |
| 73 | |
| 74 | Attributes |
| 75 | ---------- |
| 76 | data : array |
| 77 | Experimental data |
| 78 | _fit : class object |
| 79 | Figure object from matplotlib |
| 80 | _ax : class object |
| 81 | Axis object from matplotlib |
| 82 | _canvas : class object |
| 83 | Canvas object from matplotlib |
| 84 | element_id : int |
| 85 | Index of element |
| 86 | parameters : `atom.List` |
| 87 | A list of `Parameter` objects, subclassed from the `Atom` base class. |
| 88 | These `Parameter` objects hold all relevant xrf information |
| 89 | elist : list |
| 90 | Emission energy and intensity for given element |
| 91 | plot_opt : int |
| 92 | Linear or log plot |
| 93 | total_y : dict |
| 94 | Results for k lines |
| 95 | total_l : dict |
| 96 | Results for l and m lines |
| 97 | prefit_x : array |
| 98 | X axis with limited range |
| 99 | plot_title : str |
| 100 | Title for plotting |
| 101 | fit_x : array |
| 102 | x value for fitting |
| 103 | fit_y : array |
| 104 | fitted data |
| 105 | plot_type_names : list |
| 106 | linear or log plot |
| 107 | max_v : float |
| 108 | max value of data array |
| 109 | incident_energy : float |
| 110 | in KeV |
| 111 | param_model : Typed(object) |
| 112 | Reference to ParamModel object |
| 113 | """ |
| 114 | |
| 115 | # data = Typed(object) # Typed(np.ndarray) |
| 116 | exp_data_label = Str("experiment") |
| 117 | |
| 118 | number_pts_to_show = Int(3000) # The number of spectrum point to show |
| 119 | |
| 120 | # ------------------------------------------------------------- |
| 121 | # Preview plot (raw experimental spectra) |
| 122 | _fig_preview = Typed(Figure) |
| 123 | _ax_preview = Typed(Axes) |
| 124 | _lines_preview = List() |
| 125 | _bahr_preview = Typed(PolyCollection) |
| 126 | |
| 127 | plot_type_preview = Typed(PlotTypes) |