|
Calling Sequence
|
|
WaveletCoefficients(Wavelet, WaveletParams, options)
|
|
Parameters
|
|
Wavelet
|
-
|
string or name; the name of a supported orthogonal wavelet family
|
WaveletParams
|
-
|
parameters to the wavelet family Wavelet
|
options
|
-
|
(optional) equation of the form guarddigits = integer
|
|
|
|
|
Options
|
|
•
|
guarddigits can be any positive integer. Setting guarddigits=d means that all computations done to generate the wavelet will be done with Digits+d digits of precision. Answers are returned to Digits digits of precision.
|
•
|
The default value for guarddigits is 20 for all wavelets except Battle-Lemarie wavelets. See Wavelets for details.
|
|
|
Description
|
|
•
|
If Wavelet is an orthogonal family, then WaveletCoefficients(Wavelet, WaveletParams) returns two Vectors, the high pass and low pass filters of the wavelet in the Wavelet family with parameters WaveletParams.
|
•
|
In this case, WaveletParams is usually a single positive integer, and often represents the size of the wavelet or the number of vanishing moments of the wavelet.
|
•
|
If Wavelet is a biorthogonal family, WaveletCoefficients(Wavelet, WaveletParams) returns four Vectors. The first two Vectors are the high pass and low pass analysis filters of the wavelet in the Wavelet family with parameters WaveletParams. The second two Vectors are the synthesis filters.
|
•
|
In this case, WaveletParams is usually a sequence of two numbers, which often represent the size of the wavelet or the number of vanishing moments of the wavelet.
|
•
|
The low pass filter is also known as the refinement or scaling coefficients, and the high pass filter is also known as the wavelet coefficients.
|
•
|
If Digits < evalhf(Digits), then all Vectors returned are of datatype=float[8]. Otherwise, results are returned with Digits digits.
|
•
|
WaveletCoefficients references a database of stored wavelet coefficients and intermediate computations whenever possible. However, wavelets can be computed to arbitrary precision, by changing either Digits or guarddigits.
|
•
|
The supported orthogonal families are Daubechies, Symlet, Coiflet, and BattleLemarie.
|
•
|
The supported biorthogonal families are BiorthogonalSpline and CDF. CDF is a single wavelet, not a family.
|
–
|
See the Wavelets page for details on wavelet families and parameters.
|
•
|
All orthogonal wavelets are normalized to have () norm 1. If w1 and w2 are the high and low pass filter of an orthogonal wavelet, then
|
add(w1[i]*w1[i+k], i=max(0,-k)..min(rtable_num_elems(w1),rtable_num_elems(w1)-k));
add(w2[i]*w2[i+k], i=max(0,-k)..min(rtable_num_elems(w2),rtable_num_elems(w2)-k));
|
are if k=0 (because w1 and w2 have norm 1) and if k is even but not . Also,
|
add(w1[i]*w2[i+k], i=max(0,-k)..min(rtable_num_elems(w2),rtable_num_elems(w2)-k));
|
is for all even k. w1 and w2 are always of the same size.
|
•
|
w1 can be obtained by reversing w2 and negating every second element.
|
•
|
If w1a, w2a, w1s, and w2s are the high and low pass analysis and synthesis filters, then
|
add(w1a[i]*w1s[i+k], i=max(0,-k)..min(rtable_num_elems(w1),rtable_num_elems(w1)-k));
add(w2a[i]*w2s[i+k], i=max(0,-k)..min(rtable_num_elems(w2),rtable_num_elems(w2)-k));
|
are if k=0 and if k is even but not . Also,
|
add(w1a[i]*w2s[i+k], i=max(0,-k)..min(rtable_num_elems(w1),rtable_num_elems(w1)-k));
add(w2a[i]*w1s[i+k], i=max(0,-k)..min(rtable_num_elems(w2),rtable_num_elems(w2)-k));
•
|
If necessary, w1a, w2a, w1s, and w2s are padded with 0s to ensure they are all of the same length.
|
•
|
w1s can be obtained by reversing w2a and negating every second coefficient; likewise for w2s and w1a.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (2) |
Note that the output is different from the commonly cited values [1,-1] and [1,1] because it has been normalized to have norm 1.
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
|
|
|