emg_filter.py 文件源码

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

项目:pyEMG 作者: agamemnonc 项目源码 文件源码
def emg_filter_comb(x):
    """ Comb filtering at 50 Hz, for 2KHz sampling frequency. 
        Coefficients are computed with MATLAB."""
    b = np.zeros(41)
    a = np.zeros(41)
    b[0] = 0.941160767899653
    b[-1] = -0.941160767899653
    a[0] = 1.
    a[-1] = -0.882321535799305
    return filtfilt(b=b, a=a, x=x, axis=0, method = 'pad', padtype = 'odd',
                    padlen = np.minimum(3*np.maximum(len(a),len(b)), x.shape[0]-1))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号