def execute(self):
        self.samples.append(self.data_in)
        self.times.append(time.time())
        self.size = len(self.samples)
        if self.size > self.n:
            self.ready = True
            self.samples = self.samples[-self.n:]
            self.times = self.times[-self.n:]
        if self.size>4:
            self.fft = self.get_fft()
            if self.spike_limit:
                if max(self.samples)-min(self.samples) > self.spike_limit:
                    self.reset()
dataset/ETHPy150Open thearn/webcam-pulse-detector/lib/signalProcess.py/BufferFFT.execute/original