pywt

Basic plotting of wavelet analysis output in matplotlib

a 夏天 提交于 2019-12-20 10:58:56
问题 I am discovering wavelets in practice thanks to the python module pywt. I have browsed some examples of the pywt module usage, but I could not grasp the essential step: I don't know how to display the multidimensionnal output of a wavelet analysis with matplotlib , basically. This is what I tried, (given one pyplot axe ax ): import pywt data_1_dimension_series = [0,0.1,0.2,0.4,-0.1,-0.1,-0.3,-0.4,1.0,1.0,1.0,0] # indeed my data_1_dimension_series is much longer cA, cD = pywt.dwt(data_1

Multilevel partial wavelet reconstruction with pyWavelets

我的未来我决定 提交于 2019-12-08 07:52:47
问题 I'm looking for a way to partially reconstruct branches of a wavelet decomposition, such that the sum would recreate the original signal. This could be achieved using Matlab using: DATA = [0,1,2,3,4,5,6,7,8,9] N_LEVELS = 2; WAVELET_NAME = 'db4'; [C,L] = wavedec(DATA, N_LEVELS, WAVELET_NAME); A2 = wrcoef('a', C, L, WAVELET_NAME, 2); D2 = wrcoef('d', C, L, WAVELET_NAME, 2); D1 = wrcoef('d', C, L, WAVELET_NAME, 1); A2+D2+D1 ans = 0.0000 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000 8.0000 9

Basic plotting of wavelet analysis output in matplotlib

与世无争的帅哥 提交于 2019-12-03 00:50:21
I am discovering wavelets in practice thanks to the python module pywt . I have browsed some examples of the pywt module usage , but I could not grasp the essential step: I don't know how to display the multidimensionnal output of a wavelet analysis with matplotlib , basically. This is what I tried, (given one pyplot axe ax ): import pywt data_1_dimension_series = [0,0.1,0.2,0.4,-0.1,-0.1,-0.3,-0.4,1.0,1.0,1.0,0] # indeed my data_1_dimension_series is much longer cA, cD = pywt.dwt(data_1_dimension_series, 'haar') ax.set_xlabel('seconds') ax.set_ylabel('wavelet affinity by scale factor') ax