MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / set_selected_eline

Method set_selected_eline

pyxrf/gui_support/gpc_class.py:1386–1408  ·  view source on GitHub ↗

Sets and display the location of current emission line

(self, eline)

Source from the content-addressed store, hash-verified

1384 self.plot_model.element_id = n_id
1385
1386 def set_selected_eline(self, eline):
1387 """Sets and display the location of current emission line"""
1388 self.select_eline(eline)
1389
1390 eline_category = self.get_eline_name_category(eline)
1391 if eline_category == "userpeak":
1392 self.fit_model.select_index_by_eline_name(eline)
1393 # This will delete the peak lines (no peak lines are plotted for user peak)
1394 self.plot_model.plot_current_eline(eline)
1395 # Show the marker at the center of the userpeak
1396 energy, _ = self.param_model.get_selected_eline_energy_fwhm(eline)
1397 self.plot_model.set_plot_vertical_marker(energy)
1398 elif eline_category == "pileup":
1399 # The lines for pileup peak are not displayed as 'plot_model.element_id' is changed.
1400 # So call plotting function explicitly
1401 self.plot_model.plot_current_eline(eline)
1402 self.plot_model.hide_plot_vertical_marker()
1403 elif eline_category == "eline":
1404 self.plot_model.hide_plot_vertical_marker()
1405 else:
1406 # This will delete the peak lines
1407 self.plot_model.plot_current_eline(eline)
1408 self.plot_model.hide_plot_vertical_marker()
1409
1410 def get_eline_intensity(self, eline):
1411 line_category = self.get_eline_name_category(eline)

Callers 1

_set_selected_elineMethod · 0.80

Tested by

no test coverage detected