Skip to contents

SOURCE. Daubechies, I. (1988), "Orthonormal bases of compactly supported wavelets", Communications on Pure and Applied Mathematics 41(7):909-996, doi:10.1002/cpa.3160410705.

Usage

Wave(y, wavelet = "db2", level = NULL)

Arguments

y

Signal of length 2^J, J at least 1.

wavelet

"db1", "db2" or "db3".

level

Pyramid depth; default the full J levels.

Value

List with basis, coefficients, h, g, orthonormality, normalisation, double_shift, vanishing_moments, gram_error, energy_in, energy_out, n, level, filter_length.

Details

The scaling filter h of length L = 2N is what the paper constructs: the compactly supported solution of the two-scale relation whose defining conditions are sum h_k = sqrt(2), sum_k h_k h_{k+2m} = delta_{m0}, and sum_k (-1)^k k^m h_k = 0 for m = 0 ... N-1. The wavelet filter is the quadrature mirror g_k = (-1)^k h_{L-1-k}. Those conditions determine h up to reflection and are checked numerically here rather than taken on trust: orthonormality, double_shift and vanishing_moments are the residuals.

FILTERS. db1 (Haar), db2 and db3, each from its exact radical closed form rather than a decimal table: db1 h = (1,1)/sqrt(2); db2 h = (1+r3, 3+r3, 3-r3, 1-r3)/(4 sqrt(2)) with r3 = sqrt(3); db3 h = c/sqrt(2) with 16c = (1+a+b, 5+a+3b, 10-2a+2b, 10-2a-2b, 5+a-3b, 1+a-b), a = sqrt(10), b = sqrt(5+2a). Longer filters have no compact radical form and are NOT provided; that is this implementation's scope choice, stated rather than attributed.

BASIS. For length N = 2^J the periodic pyramid transform is orthonormal; its matrix W is built by transforming the standard basis vectors, so W W' = I is a real check on the pyramid code.

References

Daubechies, I. (1988). Communications on Pure and Applied Mathematics 41(7):909-996. doi:10.1002/cpa.3160410705.

Examples

Wave(c(1, 2, 3, 4), "db1")$coefficients
#> [1]  5.0000000 -2.0000000 -0.7071068 -0.7071068