diff --git a/pyxrf/model/draw_image.py b/pyxrf/model/draw_image.py index fdc3b807..98d5b1dc 100644 --- a/pyxrf/model/draw_image.py +++ b/pyxrf/model/draw_image.py @@ -140,6 +140,9 @@ def __init__(self, *, io_model): self.param_quant_analysis.set_experiment_distance_to_sample(distance_to_sample=0.0) self.param_quant_analysis.set_experiment_incident_energy(incident_energy=self.incident_energy) + # init of pos values + self.pixel_or_pos = 0 + self.fig = plt.figure(figsize=(3, 2)) matplotlib.rcParams["axes.formatter.useoffset"] = True @@ -171,9 +174,6 @@ def init_plot_status(self): self.scaler_items.sort() self.scaler_data = None - # init of pos values - self.set_pixel_or_pos(0) - if "positions" in self.io_model.img_dict: try: logger.debug(f"Position keys: {list(self.io_model.img_dict['positions'].keys())}") diff --git a/pyxrf/model/draw_image_rgb.py b/pyxrf/model/draw_image_rgb.py index 4d8353c6..d007aecd 100644 --- a/pyxrf/model/draw_image_rgb.py +++ b/pyxrf/model/draw_image_rgb.py @@ -135,6 +135,9 @@ def __init__(self, *, io_model, img_model_adv): "dwell_time", ] + # init of pos values + self.pixel_or_pos = 0 + self.rgb_keys = ["red", "green", "blue"] self._init_rgb_dict() @@ -155,9 +158,6 @@ def img_dict_updated(self, change): self.init_plot_status() def init_plot_status(self): - # init of pos values - self.set_pixel_or_pos(0) - # init of scaler for normalization self.scaler_name_index = 0 diff --git a/pyxrf/model/fit_spectrum.py b/pyxrf/model/fit_spectrum.py index 6d31f1ac..6337281f 100644 --- a/pyxrf/model/fit_spectrum.py +++ b/pyxrf/model/fit_spectrum.py @@ -708,7 +708,7 @@ def fit_single_pixel(self): if self.point2v > 0 or self.point2h > 0: prefix_fname = os.path.basename(self.hdf_path).split(".")[0] - output_folder = os.path.join(os.path.dirname(self.hdfpath), prefix_fname + "_pixel_fit") + output_folder = os.path.join(os.path.dirname(self.hdf_path), prefix_fname + "_pixel_fit") if os.path.exists(output_folder) is False: os.mkdir(output_folder) save_fitted_fig(