def SingleIteration(icm,data,filt,targ): icm.IterateLS(data) edge = image_processing.EnhanceEdge(icm.Y) corr = abs(PCECorrelate.PCECorrelation(edge,filt)) pce = PCECorrelate.PEAK_CORRELATION_ENERGY(corr) pks = Peaks.Peaks(pce,targ) data, mask = Peaks.Enhance_peak(data,pks,targ) all_one = np.ones(data.shape) icm.T = mask*0.9*icm.T + (all_one-mask)*icm.T return data
def testPeaks(self): peaks = [10, 56] n = np.random.normal(100.0, 1.0, 100) for peak in peaks: n[peak] = 500 p = Peaks.peaks(n, 2) print "p=", p
def findPeaks(self, m=2, useDifference=True): if useDifference: diff = self.baseline - self.mag else: diff = -self.mag self.peaksDict = Peaks.peaks(diff, m, returnDict=True) self.peaks = self.peaksDict['big'] self.pk = self.peaksDict['pk']
def findPeaks(self, m=2, useDifference=True): if useDifference: diff = self.baseline - self.mag else: diff = -self.mag self.peaksDict = Peaks.peaks(diff,m,returnDict=True) self.peaks = self.peaksDict['big'] self.pk = self.peaksDict['pk']