def imu_filter_highpass(x, order = 4, sRate = 148.148148148148, lowcut = 0.01):
""" Forward-backward band-pass filtering (IIR butterworth filter) """
nyq = 0.5 * sRate
low = lowcut/nyq
b, a = butter(N =order, Wn = low, btype = 'high')
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))
评论列表
文章目录