Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1b5ed1d5d2
18 lines (14 sloc) 0.548 kb
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pywt import WaveletPacket
wp = WaveletPacket(range(16), 'db2', maxlevel=3)
print [node.path for node in wp.get_leaf_nodes(decompose=False)]
print [node.path for node in wp.get_leaf_nodes(decompose=True)]
coeffs = [(node.path, for node in wp.get_leaf_nodes(decompose=True)]
print coeffs
wp2 = WaveletPacket(None, 'db2', maxlevel=3)
for path, data in coeffs:
wp2[path] = data
#print wp["a"]
print [node.path for node in wp2.get_leaf_nodes(decompose=False)]
print wp2.reconstruct()
Jump to Line
Something went wrong with that request. Please try again.