def butterfilt(finname, foutname, fmt, fs, fl=5.0, fh=100.0, gpass=1.0, gstop=30.0, ftype='butter', buffer_len=100000, overlap_len=100, max_len=-1):
"""Given sampling frequency, low and high pass frequencies design a butterworth filter and filter our data with it."""
fso2 = fs/2.0
wp = [fl/fso2, fh/fso2]
ws = [0.8*fl/fso2,1.4*fh/fso2]
import pdb; pdb.set_trace()
b, a = iirdesign(wp, ws, gpass=gpass, gstop=gstop, ftype=ftype, output='ba')
y = filtfiltlong(finname, foutname, fmt, b, a, buffer_len, overlap_len, max_len)
return y, b, a
评论列表
文章目录