preprocessing.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:Epileptic-Seizure-Prediction 作者: cedricsimar 项目源码 文件源码
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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号