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 pywt.wavelist list or a Wavelet object instance.
  • level – Required transform level. See the swt_max_level() function.

Returned list of coefficient pairs is in the form:

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

where n is the level value.

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 pywt.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.

Project Versions

Table Of Contents

Previous topic

2D Forward and Inverse Discrete Wavelet Transform

Next topic

Wavelet Packets

This Page