naginterfaces.library.wav.dim1_​init

naginterfaces.library.wav.dim1_init(wavnam, wtrans, mode, n)[source]

dim1_init returns the details of the chosen one-dimensional discrete wavelet filter. For a chosen mother wavelet, discrete wavelet transform type (single-level or multi-level DWT or MODWT) and end extension method, this function returns the maximum number of levels of resolution (appropriate to a multi-level transform), the filter length, and the number of approximation coefficients (equal to the number of detail coefficients) for a single-level DWT or MODWT or the total number of coefficients for a multi-level DWT or MODWT. This function must be called before any of the one-dimensional discrete transform functions in this module.

For full information please refer to the NAG Library document for c09aa

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/c09/c09aaf.html

Parameters
wavnamstr

The name of the mother wavelet. See the C09 Introduction for details.

Haar wavelet, also known as as a special case of the Daubechies wavelet.

, where

Daubechies wavelet with vanishing moments ( coefficients). For example, is the name for the Daubechies wavelet with vanishing moments ( coefficients).

, where

Coiflet wavelet of order .

Beylkin wavelet.

Vaidyanathan wavelet.

, where

Symlet wavelet of order .

, where can be one of 1.1, 1.3, 1.5, 2.2, 2.4, 2.6, 2.8, 3.1, 3.3, 3.5, 3.7, 3.9, 4.4, 5.5 or 6.8

Biorthogonal wavelet of order . For example is the name for the biorthogonal wavelet of order .

, where can be one of 1.1, 1.3, 1.5, 2.2, 2.4, 2.6, 2.8, 3.1, 3.3, 3.5, 3.7, 3.9, 4.4, 5.5 or 6.8

Reverse biorthogonal wavelet of order . For example is the name for the reverse biorthogonal wavelet of order .

wtransstr, length 1

The type of discrete wavelet transform that is to be applied.

Single-level decomposition or reconstruction by discrete wavelet transform.

Multiresolution, by a multi-level DWT or its inverse.

Single-level decomposition or reconstruction by maximal overlap discrete wavelet transform.

Multi-level resolution by a maximal overlap discrete wavelet transform or its inverse.

modestr, length 1

The end extension method. Note that only periodic end extension is currently available for the MODWT.

Periodic end extension.

Half-point symmetric end extension.

Whole-point symmetric end extension.

Zero end extension.

nint

The number of elements, , in the input data array, .

Returns
nwlmaxint

The maximum number of levels of resolution, , that can be computed when a multi-level discrete wavelet transform is applied. It is such that , for an integer.

nfint

The filter length, , for the supplied mother wavelet. This is used to determine the number of coefficients to be generated by the chosen transform.

nwcint

For a single-level transform (), the number of approximation coefficients that would be generated for the given problem size, mother wavelet, extension method and type of transform; this is also the corresponding number of detail coefficients. For a multi-level transform () the total number of coefficients that would be generated over levels and with for MODWT.

commdict, communication object

Communication structure.

Raises
NagValueError
(errno )

On entry, not recognised: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: when .

(errno )

On entry, .

Constraint: .

Notes

One-dimensional discrete wavelet transforms (DWT) or maximum overlap wavelet transforms (MODWT) are characterised by the mother wavelet, the end extension method and whether multiresolution analysis is to be performed. For the selected combination of choices for these three characteristics, and for a given length, , of the input data array, , dim1_init returns the dimension details for the transform determined by this combination. The dimension details are: , the maximum number of levels of resolution that that could be computed were a multi-level DWT/MODWT applied; , the filter length; the number of approximation (or detail) coefficients for a single-level DWT/MODWT or the total number of coefficients generated by a multi-level DWT/MODWT over levels. These values are also stored in the communication array [‘icomm’], as are the input choices, so that they may be conveniently communicated to the one-dimensional transform functions in this module.