The routine may be called by the names c09dcf or nagf_wav_dim1_mxolap_multi_fwd.
c09dcf 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 routine c09aaf in nwlmax, 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 keepa can be set to retain both approximation and detail coefficients at each level resulting in coefficients being returned in the output array, c, 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, c, is . In the present implementation, for simplicity, and are chosen to be equal by adding zero padding to the wavelet filters where necessary.
Percival D B and Walden A T (2000) Wavelet Methods for Time Series Analysis Cambridge University Press
1: – IntegerInput
On entry: the number of elements, , in the data array .
this must be the same as the value n passed to the initialization routine c09aaf.
On entry: determines whether the approximation coefficients are stored in array c for every level of the computed transform or else only for the final level. In both cases, the detail coefficients are stored in c for every level computed.
Retain approximation coefficients for all levels computed.
Retain approximation coefficients for only the final level computed.
4: – IntegerInput
On entry: the dimension of the array c as declared in the (sub)program from which c09dcf is called.
c must be large enough to contain the number of wavelet coefficients.
If , the total number of coefficients, , is returned in nwc by the call to the initialization routine c09aaf and corresponds to the MODWT being continued for the maximum number of levels possible for the given data set. When the number of levels, , is chosen to be less than the maximum, then the number of stored coefficients is correspondingly smaller and lenc can be reduced by noting that detail coefficients are stored at each level, with the storage increased at the final level to contain the approximation coefficients.
If , detail coefficients and approximation coefficients are stored for each level computed, requiring , since the numbers of stored approximation and detail coefficients are equal. The number of approximation (or detail) coefficients at each level, , is returned in na.
if , ;
if , .
5: – Real (Kind=nag_wp) arrayOutput
On exit: the coefficients of a multi-level wavelet transform of the dataset.
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 na.
6: – IntegerInput
On entry: the number of levels, , in the multi-level resolution to be performed.
, where is the value returned in nwlmax (the maximum number of levels) by the call to the initialization routine c09aaf.
7: – IntegerOutput
On exit: na contains the number of approximation coefficients, , at each level which is equal to the number of detail coefficients, . With periodic end extension ( in c09aaf) this is the same as the length, n, of the data array, x.
8: – Integer arrayCommunication Array
On entry: contains details of the discrete wavelet transform and the problem dimension as setup in the call to the initialization routine c09aaf.
On exit: contains additional information on the computed transform.
9: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, n is inconsistent with the value passed to the initialization routine: , n should be .