Stationary Wavelet Transform

Stationary Wavelet Transform (SWT), also known as Undecimated wavelet transform or Algorithme à trous is a translation-invariance modification of the Discrete Wavelet Transform that does not decimate coefficients at every transformation level.

Multilevel swt

pywt.swt(data, wavelet, level[, start_level=0])

Performs multilevel Stationary Wavelet Transform.

Parameters:
  • data – Input signal can be NumPy array, Python list or other iterable object. Both single and double precision floating-point data types are supported and the output type depends on the input type. If the input data is not in one of these types it will be converted to the default double precision data format before performing computations.
  • wavelet – Wavelet to use in the transform. This can be a name of the wavelet from the wavelist() list or a Wavelet object instance.
  • level (int) – Required transform level. See the swt_max_level() function.
  • start_level (int) – The level at which the decomposition will begin (it allows to skip a given number of transform steps and compute coefficients starting directly from the start_level)

Returns list of coefficient pairs in the form:

[(cAn, cDn), ..., (cA2, cD2), (cA1, cD1)]

where n is the level value.

If m = start_level is given, then the beginning m steps are skipped:

[(cAm+n, cDm+n), ..., (cAm+1, cDm+1), (cAm, cDm)]

Multilevel swt2

pywt.swt2(data, wavelet, level[, start_level=0])

Performs multilevel 2D Stationary Wavelet Transform.

Parameters:
  • data – 2D array with input data.
  • wavelet – Wavelet to use in the transform. This can be a name of the wavelet from the wavelist() list or a Wavelet object instance.
  • level – Number of decomposition steps to perform.
  • start_level – The level at which the decomposition will begin.

The result is a set of coefficients arrays over the range of decomposition levels:

[
    (cA_n,
        (cH_n, cV_n, cD_n)
    ),
    (cA_n+1,
        (cH_n+1, cV_n+1, cD_n+1)
    ),
    ...,
    (cA_n+level,
        (cH_n+level, cV_n+level, cD_n+level)
    )
]

where cA is approximation, cH is horizontal details, cV is vertical details, cD is diagonal details, n is start_level and m equals n+level.

Maximum decomposition level - swt_max_level

pywt.swt_max_level(input_len)

Calculates the maximum level of Stationary Wavelet Transform for data of given length.

Parameters:input_len – Input data length.

Table Of Contents

Previous topic

2D Forward and Inverse Discrete Wavelet Transform

Next topic

Wavelet Packets

Python Development

Django web development for startups and businesses.

Quality Python development and scientific applications.

Quick links

Edit this document

The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.