コード例 #1
0
        def get_peak_center(i, di):
            lp = plot.plots[di.name][0]
            xs = lp.index.get_data()
            ys = lp.value.get_data()

            result = None
            cx = None
            if len(xs) and len(ys):
                result = calculate_peak_center(xs, ys)
            if result is None or isinstance(result, str):
                self.warning('no peak center for {} {}'.format(di.name, di.isotope))
            else:
                cx = result[0][1]
            return cx
コード例 #2
0
ファイル: coincidence.py プロジェクト: OSUPychron/pychron
        def get_peak_center(di):
            try:
                lp = plot.plots[di][0]
            except KeyError:
                lp = plot.plots["*{}".format(di)][0]

            xs = lp.index.get_data()
            ys = lp.value.get_data()

            cx = None
            if len(xs) and len(ys):
                try:
                    result = calculate_peak_center(xs, ys)
                    cx = result[0][1]
                except PeakCenterError:
                    self.warning("no peak center for {}".format(di))

            return cx
コード例 #3
0
ファイル: coincidence.py プロジェクト: ael-noblegas/pychron
        def get_peak_center(di):
            try:
                lp = plot.plots[di][0]
            except KeyError:
                lp = plot.plots['*{}'.format(di)][0]

            xs = lp.index.get_data()
            ys = lp.value.get_data()

            cx = None
            if len(xs) and len(ys):
                try:
                    result = calculate_peak_center(xs, ys)
                    cx = result[0][1]
                except PeakCenterError:
                    self.warning('no peak center for {}'.format(di))

            return cx