Onedimensional 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,
$n$, of the input data array,
$x$,
c09aaf returns the dimension details for the transform determined by this combination. The dimension details are:
${l}_{\mathrm{max}}$, the maximum number of levels of resolution that that could be computed were a multilevel DWT/MODWT applied;
${n}_{f}$, the filter length;
${n}_{c}$ the number of approximation (or detail) coefficients for a singlelevel DWT/MODWT or the total number of coefficients generated by a multilevel DWT/MODWT over
${l}_{\mathrm{max}}$ 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 onedimensional transform routines in this chapter.
None.
 1: $\mathbf{wavnam}$ – Character(*)Input

On entry: the name of the mother wavelet. See the
C09 Chapter Introduction for details.
 ${\mathbf{wavnam}}=\text{'HAAR'}$
 Haar wavelet.
 ${\mathbf{wavnam}}=\text{'DB}\mathit{n}\text{'}$, where $\mathit{n}=2,3,\dots ,10$
 Daubechies wavelet with $\mathit{n}$ vanishing moments ($2\mathit{n}$ coefficients). For example, ${\mathbf{wavnam}}=\text{'DB4'}$ is the name for the Daubechies wavelet with $4$ vanishing moments ($8$ coefficients).
 ${\mathbf{wavnam}}=\text{'BIOR}\mathit{x}$.$\mathit{y}\text{'}$, where $\mathit{x}$.$\mathit{y}$ can be one of 1.1, 1.3, 1.5, 2.2, 2.4, 2.6, 2.8, 3.1, 3.3, 3.5 or 3.7
 Biorthogonal wavelet of order $\mathit{x}$.$\mathit{y}$. For example ${\mathbf{wavnam}}=\text{'BIOR3.1'}$ is the name for the biorthogonal wavelet of order $3.1$.
Constraint:
${\mathbf{wavnam}}=\text{'HAAR'}$, $\text{'DB2'}$, $\text{'DB3'}$, $\text{'DB4'}$, $\text{'DB5'}$, $\text{'DB6'}$, $\text{'DB7'}$, $\text{'DB8'}$, $\text{'DB9'}$, $\text{'DB10'}$, $\text{'BIOR1.1'}$, $\text{'BIOR1.3'}$, $\text{'BIOR1.5'}$, $\text{'BIOR2.2'}$, $\text{'BIOR2.4'}$, $\text{'BIOR2.6'}$, $\text{'BIOR2.8'}$, $\text{'BIOR3.1'}$, $\text{'BIOR3.3'}$, $\text{'BIOR3.5'}$ or $\text{'BIOR3.7'}$.
 2: $\mathbf{wtrans}$ – Character(1)Input

On entry: the type of discrete wavelet transform that is to be applied.
 ${\mathbf{wtrans}}=\text{'S'}$
 Singlelevel decomposition or reconstruction by discrete wavelet transform.
 ${\mathbf{wtrans}}=\text{'M'}$
 Multiresolution, by a multilevel DWT or its inverse.
 ${\mathbf{wtrans}}=\text{'T'}$
 Singlelevel decomposition or reconstruction by maximal overlap discrete wavelet transform.
 ${\mathbf{wtrans}}=\text{'U'}$
 Multilevel resolution by a maximal overlap discrete wavelet transform or its inverse.
Constraint:
${\mathbf{wtrans}}=\text{'S'}$, $\text{'M'}$, $\text{'T'}$ or $\text{'U'}$.
 3: $\mathbf{mode}$ – Character(1)Input

On entry: the end extension method. Note that only periodic end extension is currently available for the MODWT.
 ${\mathbf{mode}}=\text{'P'}$
 Periodic end extension.
 ${\mathbf{mode}}=\text{'H'}$
 Halfpoint symmetric end extension.
 ${\mathbf{mode}}=\text{'W'}$
 Wholepoint symmetric end extension.
 ${\mathbf{mode}}=\text{'Z'}$
 Zero end extension.
Constraints:
 ${\mathbf{mode}}=\text{'P'}$, $\text{'H'}$, $\text{'W'}$ or $\text{'Z'}$ for DWT;
 ${\mathbf{mode}}=\text{'P'}$ for MODWT.
 4: $\mathbf{n}$ – IntegerInput

On entry: the number of elements, $n$, in the input data array, $x$.
Constraint:
${\mathbf{n}}\ge 2$.
 5: $\mathbf{nwlmax}$ – IntegerOutput

On exit: the maximum number of levels of resolution, ${l}_{\mathrm{max}}$, that can be computed when a multilevel discrete wavelet transform is applied. It is such that ${2}^{{l}_{\mathrm{max}}}\le n<{2}^{{l}_{\mathrm{max}}+1}$, for ${l}_{\mathrm{max}}$ an integer.
 6: $\mathbf{nf}$ – IntegerOutput

On exit: the filter length, ${n}_{f}$, for the supplied mother wavelet. This is used to determine the number of coefficients to be generated by the chosen transform.
 7: $\mathbf{nwc}$ – IntegerOutput

On exit: for a singlelevel transform (${\mathbf{wtrans}}=\text{'S'}$ or $\text{'T'}$), 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 multilevel transform (${\mathbf{wtrans}}=\text{'M'}$ or $\text{'U'}$) the total number of coefficients that would be generated over ${l}_{\mathrm{max}}$ levels and with ${\mathbf{keepa}}=\text{'A'}$ for MODWT.
 8: $\mathbf{icomm}\left(100\right)$ – Integer arrayCommunication Array

On exit: contains details of the wavelet transform and the problem dimension which is to be communicated to the onedimensional discrete transform routines in this chapter.
 9: $\mathbf{ifail}$ – IntegerInput/Output

On entry:
ifail must be set to
$0$,
$1\text{ or}1$. If you are unfamiliar with this argument you should refer to
Section 3.4 in How to Use the NAG Library and its Documentation for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
$1\text{ or}1$ is recommended. If the output of error messages is undesirable, then the value
$1$ is recommended. Otherwise, if you are not familiar with this argument, the recommended value is
$0$.
When the value $\mathbf{1}\text{ or}\mathbf{1}$ is used it is essential to test the value of ifail on exit.
On exit:
${\mathbf{ifail}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see
Section 6).
If on entry
${\mathbf{ifail}}=0$ or
$1$, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
Not applicable.
None.