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

Method _vertical_marker_set_inside_range

pyxrf/model/lineplot.py:894–908  ·  view source on GitHub ↗

Don't move the marker if it is inside range. If it is outside range, then set the marker to the center of the range

(self, *, e_low=None, e_high=None)

Source from the content-addressed store, hash-verified

892 return ename
893
894 def _vertical_marker_set_inside_range(self, *, e_low=None, e_high=None):
895 """
896 Don't move the marker if it is inside range. If it is outside range,
897 then set the marker to the center of the range
898 """
899 # The range of energy selected for analysis
900 if e_low is None:
901 e_low = self.param_model.param_new["non_fitting_values"]["energy_bound_low"]["value"]
902 if e_high is None:
903 e_high = self.param_model.param_new["non_fitting_values"]["energy_bound_high"]["value"]
904
905 # By default, place the marker in the middle of the range if its original position
906 # is outside the range
907 if (self.vertical_marker_kev > e_high) or (self.vertical_marker_kev < e_low):
908 self.vertical_marker_kev = (e_low + e_high) / 2.0
909
910 def _fill_elist(self):
911 _elist = []

Callers 1

_fill_elistMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected