Esempio n. 1
0
    def process_peaks(self, mph=0.0, mpd=0, startx=0.0, endx=0.0):

        if mph > 0:
            self.mph = mph
        if mpd > 0:
            self.mpd = mpd
        x = self.mass
        y = self.spectrum
        p = Peaks()
        ref = startx + (abs(endx - startx) / 2)
        delta = 1.0

        mph, mpd, mask = p.prepare_detect(ref, delta, x, y, startx, endx)

        # Detect peak on rising edge
        edge = 'rising'
        # Detect peak greater than threshold
        threshold = 0.0
        # Don't use default plot
        ind = p.detect_peaks(y[mask], self.mph, self.mpd, threshold, edge)
        #             print("mass =", x[mask][ind])
        #             print("inten=", y[mask][ind])

        self.mph = mph
        self.mpd = mpd
        self.mask = mask
        self.ind = ind
Esempio n. 2
0
    def process_peaks(self, mph=0.0, mpd=0, startx=0.0, endx=0.0):

        if mph > 0:
            self.mph = mph
        if mpd > 0:
            self.mpd = mpd
        x = self.mass
        y = self.spectrum
        p = Peaks()
        ref = startx + (abs(endx - startx) / 2)
        delta = 1.0

        mph, mpd, mask = p.prepare_detect(ref, delta, x, y, startx, endx)

        # Detect peak on rising edge
        edge = 'rising'
        # Detect peak greater than threshold
        threshold = 0.0
        # Don't use default plot
        ind = p.detect_peaks(y[mask], self.mph, self.mpd, threshold, edge)
#             print("mass =", x[mask][ind])
#             print("inten=", y[mask][ind])

        self.mph = mph
        self.mpd = mpd
        self.mask = mask
        self.ind = ind