Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wavelet multi-level :Direct reconstruction with upcoef #18

Open
hengley opened this issue May 7, 2019 · 1 comment
Open

Wavelet multi-level :Direct reconstruction with upcoef #18

hengley opened this issue May 7, 2019 · 1 comment

Comments

@hengley
Copy link

hengley commented May 7, 2019

Pywt.upcoef can implement a layer of decomposition and reconstruction of wavelets in Python, but after multi-layer decomposition, it is wrong to reconstruct data.

@TAUforPython
Copy link

try this

waveletname = 'db4'
dwt_coeffs = pywt.wavedec(signal, waveletname, level=5)

y_5level_idwt =
pywt.upcoef('a', dwt_coeffs[0][:], waveletname, level = 5, take = len(signal))\

  • pywt.upcoef('d', dwt_coeffs[1][:], waveletname, level = 5, take = len(signal))\
  • pywt.upcoef('d', dwt_coeffs[2][:], waveletname, level = 4, take = len(signal))\
  • pywt.upcoef('d', dwt_coeffs[3][:], waveletname, level = 3, take = len(signal))\
  • pywt.upcoef('d', dwt_coeffs[4][:], waveletname, level = 2, take = len(signal))\
  • pywt.upcoef('d', dwt_coeffs[5][:], waveletname, level = 1, take = len(signal))
    plt.plot(t,y_5level_idwt)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants