问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
# Decompose into wavelet components, to the level selected:
ffs = pywt.wavedec(data, 'db8', level=maxlev) # 将信号进行小波分解
zbs = []
plt.figure()
for i in range(1, len(ffs)):
zbs[i] = pywt.threshold(ffs[i], threshold * max(ffs[i])) # 将噪声滤波
datarec = pywt.waverec(zbs, 'db8') # 将信号进行小波重构
Traceback (most recent call last):
maximum level is 5
File "C:/Users/Desktop/1.py", line 59, in
zbs[i] = pywt.threshold(ffs[i], threshold * max(ffs[i])) # 将噪声滤波
TypeError: 'int' object is not callable