test: test the plotting of denoising

This commit is contained in:
Skudalen 2021-06-25 09:05:10 +02:00
parent bdd476eb5e
commit 21da6ba6a8
3 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ def sure_threshold_filter(cA, cD):
# soft filtering of wavelet trans with 0.25 lower percent # soft filtering of wavelet trans with 0.25 lower percent
def soft_threshold_filter(cA, cD): def soft_threshold_filter(cA, cD):
cA_filt = pywt.threshold(cA, 0.25 * cA.max()) cA_filt = pywt.threshold(cA, 0.4 * cA.max())
cD_filt = cD cD_filt = cD
return cA_filt, cD_filt return cA_filt, cD_filt

View File

@ -44,7 +44,7 @@ def test_plot_wavelet_both_ways():
cA_filt, cD_filt = soft_threshold_filter(cA, cD) cA_filt, cD_filt = soft_threshold_filter(cA, cD)
plot_arrays(x, cA_filt) plot_arrays(x, cA_filt)
#print(len(cA_filt)) #print(len(cA_filt))
y_new_values = inverse_wavelet(df, cA, cD) y_new_values = inverse_wavelet(df, cA_filt, cD_filt)
#print(len(y_new_values)) #print(len(y_new_values))
plot_arrays(N, y_new_values) plot_arrays(N, y_new_values)