Daubechies orthogonal wavelet in python

3.8k views Asked by At

I am newbie in Signal Processing, In here I want to ask how to use Daubechies orthogonal wavelet 'db6' to filter a array data, for example like this:

x = [1,2,3,4]

I have read the documentation in here, but i did not find an idea to do it.

2

There are 2 answers

0
Priagung Khusumanegara On BEST ANSWER

May be you can use mlpy.wavelet and try this one:

>>> import numpy as np
>>> import mlpy.wavelet as wave
>>> X = np.array([ 5.65685425,  3.41458985,  0.29185347, -0.29185347, -0.28310081,
...               -0.07045258,  0.28310081,  0.07045258])
>>> wave.idwt(X=X, wf='d', k=6)
array([  1.00000000e+00,   2.00000000e+00,   3.00000000e+00,
         4.00000000e+00,   3.00000000e+00,   2.00000000e+00,
         1.00000000e+00,  -3.53954610e-09])

For detail explanation you can visit here

0
Paul On

Or better use pywt python package: http://www.pybytes.com/pywavelets/