PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
1.97k stars 460 forks source link

brior1.1 wavelet returns different length signal than input #642

Closed MartinMashalov closed 2 years ago

MartinMashalov commented 2 years ago

Hello,

I am using wavelets to decompose stock market price signals. I am inputting an array with length 1502 and getting a signal with 1504 entries. How should I deal with the extra values? Can I just remove the last two or first two?

Thank you.

Martin

grlee77 commented 2 years ago

Yes, any extra values should be removed from the end of the reconstructed signal. This is a known behavior for round trip forward/inverse transform at n levels when the input signal size is not a multiple of 2**n.