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

Method plot_emission_line

pyxrf/model/lineplot.py:777–804  ·  view source on GitHub ↗

Plot emission line and escape peaks associated with given lines. The value of self.max_v is needed in this function in order to plot the relative height of each emission line.

(self)

Source from the content-addressed store, hash-verified

775 self._update_canvas()
776
777 def plot_emission_line(self):
778 """
779 Plot emission line and escape peaks associated with given lines.
780 The value of self.max_v is needed in this function in order to plot
781 the relative height of each emission line.
782 """
783 while len(self.eline_obj):
784 self.eline_obj.pop().remove()
785
786 escape_e = self.escape_e
787
788 if len(self.elist):
789 for i in range(len(self.elist)):
790 (eline,) = self._ax.plot(
791 [self.elist[i][0], self.elist[i][0]],
792 [0, self.elist[i][1] * self.max_v],
793 color=self.plot_style["emission_line"]["color"],
794 linewidth=self.plot_style["emission_line"]["linewidth"],
795 )
796 self.eline_obj.append(eline)
797 if self.plot_escape_line and self.elist[i][0] > escape_e:
798 (eline,) = self._ax.plot(
799 [self.elist[i][0] - escape_e, self.elist[i][0] - escape_e],
800 [0, self.elist[i][1] * self.max_v],
801 color=self.plot_style["escape"]["color"],
802 linewidth=self.plot_style["emission_line"]["linewidth"],
803 )
804 self.eline_obj.append(eline)
805
806 def _set_eline_select_controls(self, *, element_id=None, data="use_self_data"):
807 if element_id is None:

Callers 2

plot_current_elineMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected