from scipy import signal
# 带通滤波器
# 信号,频率下限,频率上限, 采样率
def bandPass(signals, fre_low, fre_high, fs):
b, a = signal.butter(8, [2.0 * fre_low / fs, 2.0 * fre_high / fs], 'bandpass', 'sos')
filtedData = signal.filtfilt(b, a, signals)
return filtedData