skued.dtcwt

skued.dtcwt(data, first_stage, wavelet, mode='constant', level=None, axis=-1)

1D Dual-tree complex wavelet transform [1] along an axis.

Parameters:
  • data (array_like) – Input data. Can be of any shape, but the transform can only be applied in 1D (i.e. along a single axis). The length along axis must be even.

  • first_stage (str) – Wavelet to use for the first stage. See skued.available_first_stage_filters() for a list of suitable arguments

  • wavelet (str) – Wavelet to use in stages > 1. Must be appropriate for the dual-tree complex wavelet transform. See skued.available_dt_filters() for possible values.

  • mode (str, optional) – Signal extension mode, see pywt.Modes.

  • level (int or None, optional) – Decomposition level (must be >= 0). If level is None (default) then it will be calculated using the dt_max_level function.

  • axis (int, optional) – Axis over which to compute the transform. Default is -1.

Returns:

[cA_n, cD_n, cD_n-1, …, cD2, cD1] – Ordered list of coefficients arrays where n denotes the level of decomposition. The first element (cA_n) of the result is approximation coefficients array and the following elements (cD_n - cD_1) are details coefficients arrays. Arrays have the same number of dimensions as the input.

Return type:

list

Raises:

ValueError – Raised if axis argument is invalid (e.g. too large) or if the input data: is not even along the transform direction.

Notes

The implementation uses two tricks [1]:

  • Different first-stage wavelet: The first level of the dual-tree complex wavelet transform involves a combo of shifted wavelets.

  • Swapping of filters at each stage: At each level > 1, the filters (separated into real and imaginary trees) are swapped.

References