def low_cut_filter(x, fs, cutoff=70):
"""Low cut filter
Parameters
---------
x : array, shape(`samples`)
Waveform sequence
fs: array, int
Sampling frequency
cutoff : float, optional
Cutoff frequency of low cut filter
Default set to 70 [Hz]
Returns
---------
lcf_x : array, shape(`samples`)
Low cut filtered waveform sequence
"""
nyquist = fs // 2
norm_cutoff = cutoff / nyquist
# low cut filter
fil = firwin(255, norm_cutoff, pass_zero=False)
lcf_x = lfilter(fil, 1, x)
return lcf_x
评论列表
文章目录