1
$\begingroup$

I am a student and would like to know how to extract the approximation and detail coefficients (A5, D5, D4, D3, D2 and D1) after an applied DWT decomposition dB5 (Daubechies 5, level = 5)?

$\endgroup$
0
$\begingroup$

This sounds quite doable, reading the online documentation, for instance: Multilevel DWT, IDWT and SWT, by adapting the example given:

>>> import pywt
>>> x = [3, 7, 1, 1, -2, 5, 4, 6]
>>> db1 = pywt.Wavelet('db1')
>>> cA3, cD3, cD2, cD1 = pywt.wavedec(x, db1)
>>> print(cA3)
[ 8.83883476]
>>> print(cD3)
[-0.35355339]
>>> print(cD2)
[ 4.  -3.5]
>>> print(cD1)
[-2.82842712  0.         -4.94974747 -1.41421356]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.