Wavelet packet node indices

Share:

Description

Converts flattened wavelet packet node indices to corresponding level and oscillation indices.

Usage

1
wavPacketIndices(x, check.basis=TRUE)

Arguments

x

a vector of flattened wavelet packet node indices.

check.basis

a logical value. If TRUE, the set of specified indices is checked to ensure that the corresponding wavelet packet nodes form a legitimate basis by ensuring that (i) the union of all frequency ranges corresponding to the packet crystals span the normalized frequencies [0,1/2] and (ii) the normalized frequency ranges for all nodes do not overlap. Default: TRUE.

Details

In general, wavelet packet crystals can be arranged in the so-called natural order ala W(0,0) , W(1,0), W(1,1), W(2,0), W(2,1), W(2,2), W(2,3), ... , W(J,0), ..., W(J, NJ) where J is the number of decomposition levels and NJ. By definition, W(0,0) is the original time series. A given crystal is identified in the W(j,n) form above or by a flattened index. For example, the DWPT crystal in level 2 at oscillation index 1 is identified either by j,n=2,1 or by its flattened index 4 (with zero based indexing, 4 represents the fifth crystal of the wavelet packet transform in natural order). This function converts such flattened wavelet packet indices to the W(j,n) form.

Value

a list of flat, level, and osc vectors containing the flattened, decomposition level, and oscillation indices, respectively, corresponding to the input.

See Also

wavDWPT.

Examples

1
2
3
4
5
## specify a basis formed by the flattened indices 
## corresponding to the wavelet packet nodes 
## W(2,0:1) and W(3,4:7), but submit them in 
## arbitrary order 
wavPacketIndices(c(14,11,12,13,4,3), check.basis=TRUE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.