| 1 |
.. _ref-dwt: |
| 2 |
|
| 3 |
.. currentmodule:: pywt |
| 4 |
|
| 5 |
================================ |
| 6 |
Discrete Wavelet Transform (DWT) |
| 7 |
================================ |
| 8 |
|
| 9 |
Wavelet transform has recently become a very popular when it comes to analysis, |
| 10 |
de-noising and compression of signals and images. This section describes |
| 11 |
functions used to perform single- and multilevel Discrete Wavelet Transforms. |
| 12 |
|
| 13 |
|
| 14 |
Single level ``dwt`` |
| 15 |
-------------------- |
| 16 |
|
| 17 |
.. autofunction:: dwt |
| 18 |
|
| 19 |
See the :ref:`signal extension modes <ref-modes>` section for the list of |
| 20 |
available options and the :func:`dwt_coeff_len` function for information on |
| 21 |
getting the expected result length. |
| 22 |
|
| 23 |
The transform can be performed over one axis of multi-dimensional |
| 24 |
data. By default this is the last axis. For multi-dimensional transforms |
| 25 |
see the :ref:`2D transforms <ref-dwt2>` section. |
| 26 |
|
| 27 |
|
| 28 |
Multilevel decomposition using ``wavedec`` |
| 29 |
------------------------------------------ |
| 30 |
|
| 31 |
.. autofunction:: wavedec |
| 32 |
|
| 33 |
|
| 34 |
Partial Discrete Wavelet Transform data decomposition ``downcoef`` |
| 35 |
------------------------------------------------------------------ |
| 36 |
|
| 37 |
.. autofunction:: downcoef |
| 38 |
|
| 39 |
|
| 40 |
Maximum decomposition level - ``dwt_max_level``, ``dwtn_max_level`` |
| 41 |
------------------------------------------------------------------- |
| 42 |
|
| 43 |
.. autofunction:: dwt_max_level |
| 44 |
.. autofunction:: dwtn_max_level |
| 45 |
|
| 46 |
|
| 47 |
.. _`dwt_coeff_len`: |
| 48 |
|
| 49 |
Result coefficients length - ``dwt_coeff_len`` |
| 50 |
---------------------------------------------- |
| 51 |
|
| 52 |
.. autofunction:: dwt_coeff_len |
| 53 |
|
| 54 |
Based on the given input data length (``data_len``), wavelet decomposition |
| 55 |
filter length (``filter_len``) and :ref:`signal extension mode <Modes>`, the |
| 56 |
:func:`dwt_coeff_len` function calculates the length of the resulting |
| 57 |
coefficients arrays that would be created while performing :func:`dwt` |
| 58 |
transform. |
| 59 |
|
| 60 |
``filter_len`` can be either an ``int`` or :class:`Wavelet` object for |
| 61 |
convenience. |