PyWavelets / pywt

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

length of returned arrays #175

Closed nareto closed 8 years ago

nareto commented 8 years ago

why does pywt.dwt(np.arange(8),'db2') return two arrays of size 5 each? As far as I understand the DWT should always do a downsampling of size 2, no matter the length of the filter... Am I missing something?

EDIT: where of course I did import numpy as np before

kwohlfahrt commented 8 years ago

The default is to pad the signal (there are multiple padding methods available). For the minimum signal length (i.e. 2x downsampling), the "periodization" mode should be used. Detailed documentation is here.

kwohlfahrt commented 8 years ago

Closing, think the question is answered. Re-open if not.