def _findPeaks(self, pkWndw, pkDelta): """ Find the peaks and valleys in the data """ self.peaks = {} self.valleys = {} for key in list(self.data.keys()): ls = LineScan(self.data[key]) # need to automagically adjust the window # to make sure we get a minimum number of # of peaks, maybe let the user guess a min? self.peaks[key] = ls.findPeaks(pkWndw, pkDelta) self.valleys[key] = ls.findValleys(pkWndw, pkDelta)
def __init__(self): self._rtData = LineScan([]) # the deployed data self._steadyState = None # mu/signal for the ss behavior self._extractor = None self._roi = None self._window = None self._template = None self._cutoff = None self._bestKey = None self._isPeak = False self.corrTemplates = None self.peaks = {} self.valleys = {} self.doPeaks = {} self.corrStdMult = 3.0 self.count = 0