def low_pass_filter(self, sig, low_cut, high_cut, nyq):
"""
Apply a low pass filter to the data to take the relevant frequencies
and to smooth the drop-out regions
No resample necessary because all files have the same sampling frequency
"""
b, a = signal.butter(5, np.array([low_cut, high_cut]) / nyq, btype='band')
sig_filt = signal.lfilter(b, a, sig, axis=0)
return(np.float32(sig_filt))
preprocessing.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录