naginterfaces.library.wav.dim1_mxolap_multi_fwd¶
- naginterfaces.library.wav.dim1_mxolap_multi_fwd(x, keepa, nwl, comm)[source]¶
dim1_mxolap_multi_fwd
computes the one-dimensional multi-level maximal overlap discrete wavelet transform (MODWT). The initialization functiondim1_init()
must be called first to set up the MODWT options.For full information please refer to the NAG Library document for c09dc
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/c09/c09dcf.html
- Parameters
- xfloat, array-like, shape
contains the input dataset , for .
- keepastr, length 1
Determines whether the approximation coefficients are stored in array for every level of the computed transform or else only for the final level. In both cases, the detail coefficients are stored in for every level computed.
Retain approximation coefficients for all levels computed.
Retain approximation coefficients for only the final level computed.
- nwlint
The number of levels, , in the multi-level resolution to be performed.
- commdict, communication object, modified in place
Communication structure.
This argument must have been initialized by a prior call to
dim1_init()
.
- Returns
- cfloat, ndarray, shape
The coefficients of a multi-level wavelet transform of the dataset.
The coefficients are stored in as follows:
If ,
Contains the level approximation coefficients;
Contains the level detail coefficients, for ;
If ,
Contains the level approximation coefficients, for ;
Contains the level i detail coefficients, for ;
The values and denote the numbers of approximation and detail coefficients respectively, which are equal and returned in .
- naint
contains the number of approximation coefficients, , at each level which is equal to the number of detail coefficients, . With periodic end extension ( in
dim1_init()
) this is the same as the length, , of the data array, .
- Raises
- NagValueError
- (errno )
On entry, is inconsistent with the value passed to the initialization function: , should be .
- (errno )
On entry, is larger than the maximum number of levels returned by the initialization function: , maximum = .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, the initialization function
dim1_init()
has not been called first or it has not been called with , or the communication array [‘icomm’] has become corrupted.- (errno )
On entry, .
Constraint: .
- Notes
dim1_mxolap_multi_fwd
computes the multi-level MODWT for a data set, , for , in one dimension. For a chosen number of levels, , with , where is returned by the initialization functiondim1_init()
in , the transform is returned as a set of coefficients for the different levels stored in a single array. Periodic reflection is currently the only available end extension method to reduce the edge effects caused by finite data sets.The argument can be set to retain both approximation and detail coefficients at each level resulting in coefficients being returned in the output array, , where is the number of approximation coefficients and is the number of detail coefficients. Otherwise, only the detail coefficients are stored for each level along with the approximation coefficients for the final level, in which case the length of the output array, , is . In the present implementation, for simplicity, and are chosen to be equal by adding zero padding to the wavelet filters where necessary.
- References
Percival, D B and Walden, A T, 2000, Wavelet Methods for Time Series Analysis, Cambridge University Press