def filters(array, sample_frequency): """ Apply preprocessing such as whitening and bandpass """ strain = TimeSeries(array, sample_rate=int(sample_frequency)) white_data = strain.whiten(fftlength=4, fduration=4) bp_data = white_data.bandpass(50, 250) return bp_data.value
def filters(array, sample_frequency): strain = TimeSeries(array, sample_rate=int(sample_frequency)) white_data = strain.whiten(fftlength=4, fduration=4) bp_data = white_data.bandpass(50, 250) return (bp_data.value)
def whitenStrain(self): strain_gw = TimeSeries(self.strain) self.whitened = strain_gw.whiten(4, 2).value