Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving a point in recoil atom distribution does not update the ratio in energy spectrum #199

Open
aleekaup2 opened this issue Sep 24, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@aleekaup2
Copy link
Contributor

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.

ratiobugi

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()

@aleekaup2 aleekaup2 added the bug Something isn't working label Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant