def find_offset(self):
        N = len(self.samples)
        for i in xrange(2,N):
            samples = self.samples[i:]
            delta =  max(samples)-min(samples)
            if delta < self.spike_limit:
                return N-i
dataset/ETHPy150Open thearn/webcam-pulse-detector/lib/signalProcess.py/BufferFFT.find_offset/original