Skip to content

Commit

Permalink
FIX: selection of pixels/positions in image viewer is not reset after…
Browse files Browse the repository at this point in the history
… repeated map fitting
  • Loading branch information
dmgav committed Apr 9, 2024
1 parent f879af1 commit 133cccd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pyxrf/model/draw_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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())}")
Expand Down
6 changes: 3 additions & 3 deletions pyxrf/model/draw_image_rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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

Expand Down

0 comments on commit 133cccd

Please sign in to comment.