imu_filter.py 文件源码

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

项目:pyEMG 作者: agamemnonc 项目源码 文件源码
def imu_filter_bandpass(x, order = 4, sRate = 148.148148148148, lowcut = 1., highcut = 20.):
    """ Forward-backward band-pass filtering (IIR butterworth filter) """
    nyq = 0.5 * sRate
    low = lowcut/nyq
    high = highcut/nyq
    b, a = butter(N =order, Wn = [low, high], btype = 'band')
    return filtfilt(b=b, a=a, x=x, axis=0, method = 'pad', padtype = 'odd',
                    padlen = np.minimum(3*len(a)*len(b), x.shape[0]-1))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号