c09baf computes the real part of the one-dimensional, continuous wavelet transform
of a signal
at scale
and position
, where the signal is sampled discretely at
equidistant points
, for
.
is the wavelet function, which can be chosen to be the Morlet wavelet, the derivatives of a Gaussian or the Mexican hat wavelet (
denotes the complex conjugate). The integrals of the scaled, shifted wavelet function are approximated and the convolution is then computed.
The mother wavelets supplied for use with this routine are defined as follows.
-
1.The Morlet wavelet (real part) with nondimensional wave number is
where the correction term, (required to satisfy the admissibility condition) is included.
-
2.The derivatives of a Gaussian are obtained from
taking . These are the Hermite polynomials multiplied by the Gaussian. The sign is then adjusted to give when is even while the sign of the succeeding odd derivative, , is made consistent with the preceding even numbered derivative. They are normalized by the -norm,
The resulting normalized derivatives can be written in terms of the Hermite polynomials,
, as
where
Thus, the derivatives of a Gaussian provided here are,
-
3.The second derivative of a Gaussian is known as the Mexican hat wavelet and is supplied as an additional function in the form
The remaining normalized derivatives of a Gaussian can be expressed as multiples of the exponential by applying the substitution followed by multiplication with the scaling factor, .
-
1:
– Character(*)
Input
-
On entry: the name of the mother wavelet. See the
C09 Chapter Introduction for details.
- Morlet wavelet.
- Derivative of a Gaussian wavelet.
- Mexican hat wavelet.
Constraint:
, or .
-
2:
– Integer
Input
-
On entry: the nondimensional wave number for the Morlet wavelet or the order of the derivative for the Gaussian wavelet. It is not referenced when .
Constraints:
- if , ;
- if , .
-
3:
– Integer
Input
-
On entry: the size, , of the input dataset .
Constraint:
.
-
4:
– Real (Kind=nag_wp) array
Input
-
On entry:
x contains the input dataset
, for
.
-
5:
– Integer
Input
-
On entry: the dimension of the array
scales and the first dimension of the array
c as declared in the (sub)program from which
c09baf is called. The number of scales to be computed.
Constraint:
.
-
6:
– Integer array
Input
-
On entry: the scales at which the transform is to be computed.
Constraint:
, for .
-
7:
– Real (Kind=nag_wp) array
Output
-
On exit: the transform coefficients at the requested scales, where is the transform coefficient at scale and position .
-
8:
– Integer
Input/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).
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
This example computes the continuous wavelet transform of a dataset containing a single nonzero value representing an impulse. The Morlet wavelet is used with wave number and scales , , , .