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

Method remove_peak_manual

pyxrf/model/parameters.py:568–587  ·  view source on GitHub ↗

Manually add an emission line (or peak). The name emission line (peak) to be deleted must be writtent to `self.e_name` before calling the function.

(self)

Source from the content-addressed store, hash-verified

566 self.data_for_plot()
567
568 def remove_peak_manual(self):
569 """
570 Manually add an emission line (or peak). The name emission line (peak) to be deleted
571 must be writtent to `self.e_name` before calling the function.
572 """
573 if self.e_name not in self.EC.element_dict:
574 msg = (
575 f"Line '{self.e_name}' is not in the list of selected lines,\n"
576 f"therefore it can not be deleted from the list."
577 )
578 raise RuntimeError(msg)
579
580 # Update parameter list
581 self._remove_parameters_for_eline(self.e_name)
582
583 # Update EC
584 self.EC.delete_item(self.e_name)
585 self.EC.update_peak_ratio()
586 self.update_name_list()
587 self.data_for_plot()
588
589 def remove_elements_below_threshold(self, threshv=None):
590 if threshv is None:

Callers

nothing calls this directly

Calls 5

update_name_listMethod · 0.95
data_for_plotMethod · 0.95
delete_itemMethod · 0.80
update_peak_ratioMethod · 0.80

Tested by

no test coverage detected