When point is moved in recoil atom distribution, the energy spectrum updates correctly but the values calculated by ratio tool will not update until the whole plot is redrawn.
Notes:
Moving a point sends pyqtsignal which connects to the update_spectra() in matplotlib\energy_spectrum.py
In the update_spectra() the .simu file gets recalculated by elem_sim.calculate_espe() and the new data is updated to the matplotlib.line2D object with self.plots[espe_file].set_data(data)
However the ratio is not updated. Calling show_ratio() or on_span_select() again will not update the ratio but uses the old values.
The on_span_select() seems to check the self.plots again:
drawn_lines = { path: self.files_to_draw[path] for path, line in self.plots.items() if line.get_linestyle() != "None" }
The drawn_lines is used for creating self.lines_of_area. In the show_ratio() the self.lines_of_area is then used in the __calculate_selected_area()
All in all, for some reason self.plots[espe_file].set_data(data) does not seem to update self.plots.items()
When point is moved in recoil atom distribution, the energy spectrum updates correctly but the values calculated by ratio tool will not update until the whole plot is redrawn.
Notes:
Moving a point sends pyqtsignal which connects to the
update_spectra()
in matplotlib\energy_spectrum.pyIn the
update_spectra()
the .simu file gets recalculated byelem_sim.calculate_espe()
and the new data is updated to the matplotlib.line2D object withself.plots[espe_file].set_data(data)
However the ratio is not updated. Calling
show_ratio()
oron_span_select()
again will not update the ratio but uses the old values.The
on_span_select()
seems to check theself.plots
again:drawn_lines = { path: self.files_to_draw[path] for path, line in self.plots.items() if line.get_linestyle() != "None" }
The
drawn_lines
is used for creatingself.lines_of_area.
In theshow_ratio()
theself.lines_of_area
is then used in the__calculate_selected_area()
All in all, for some reason
self.plots[espe_file].set_data(data)
does not seem to updateself.plots.items()