naginterfaces.library.wav.dim2_​coeff_​ext

naginterfaces.library.wav.dim2_coeff_ext(ilev, cindex, c, comm)[source]

dim2_coeff_ext extracts a selected set of discrete wavelet transform (DWT) coefficients from the full set of coefficients stored in compact form, as computed by dim2_multi_fwd() (two-dimensional DWT).

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

https://www.nag.com/numeric/nl/nagdoc_30/flhtml/c09/c09eyf.html

Parameters
ilevint

The level at which coefficients are to be extracted.

cindexint

Identifies which coefficients to extract. The coefficients are identified as follows:

The approximation coefficients, produced by application of the low pass filter over columns and rows of the original matrix (LL). The approximation coefficients are available only for , where is the value used in a preceding call to dim2_multi_fwd().

The vertical detail coefficients produced by applying the low pass filter over columns of the original matrix and the high pass filter over rows (LH).

The horizontal detail coefficients produced by applying the high pass filter over columns of the original matrix and the low pass filter over rows (HL).

The diagonal detail coefficients produced by applying the high pass filter over columns and rows of the original matrix (HH).

cfloat, array-like, shape

DWT coefficients, as computed by a preceding call to dim2_multi_fwd().

commdict, communication object, modified in place

Communication structure.

This argument must have been initialized by a prior call to dim2_init().

Returns
dfloat, ndarray, shape

The requested coefficients.

If (as used in dim2_multi_fwd()) and , the approximation coefficients are stored in , for , for .

Otherwise the level detail coefficients (of type specified by ) are stored in , for , for .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: , where is the number of levels used in the call to dim2_multi_fwd().

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: , where is the number of DWT coefficients computed in a previous call to dim2_multi_fwd().

(errno )

On entry, and , but .

Constraint: when in the preceding call to dim2_multi_fwd().

(errno )

Either the initialization function has not been called first or [‘icomm’] has been corrupted.

(errno )

Either the initialization function was called with or [‘icomm’] has been corrupted.

Notes

dim2_coeff_ext is intended to be used after a call to dim2_multi_fwd() (two-dimensional DWT), which in turn should be preceded by a call to dim2_init() (two-dimensional wavelet filter initialization). Given an initial two-dimensional data set , a prior call to dim2_multi_fwd() computes the approximation coefficients (at the highest requested level) and three sets of detail coefficients at all levels and stores these in compact form in a one-dimensional array . dim2_coeff_ext can then extract either the approximation coefficients or one of the sets of detail coefficients at one of the levels into a matrix . The dimensions of depend on the level extracted and are available from the arrays and as returned by dim2_multi_fwd() which contain the first and second dimensions respectively. See the C09 Introduction for a discussion of the two-dimensional DWT.