wavPacketBasis: Extract wavelet packet basis from a DWPT

Description Usage Arguments See Also Examples

Description

Returns the DWPT crystals (in a list) corresponding to the basis specified by the indices vector. The indices are mapped as follows:

0

original series

1:2

W(1,0), W(1,1), i.e., all level 1 crystals

3:6

W(2,0),...,W(2,3), i.e., all level 2 crystals

and so on. If the indices do not form a basis, an error is issued.

Usage

1
wavPacketBasis(x, indices=0)

Arguments

x

an object of class wavTransform associated with the output of the wavDWPT function.

indices

an integer vector. Each integer denotes a particular crystal of the DWPT to extract. The set of crystals shoudl form a basis, i.e., the collective frequency ranges associated with the set of crystals should span normalized frequencies [0, 1/2]. The indices for each DWPT level and the corresponding (ideal) normalized frequency ranges are listed in the table below:

0

Frequency range: [0, 1/2], associated with crystal W(0,0) (the original series).

1,2

Frequency range: [0,1/4],[1/4, 1/2], associated with crystals W(1,0), W(1,1), respectively.

3,4,5,6

Frequency range: [0,1/8],[1/8, 1/4],[1/4,3/8],[3/8, 1/2], associated with crystals W(2,0),W(2,1),W(2,2),W(2,3), respectively.

and so forth.

See Also

wavDWPT, wavBestBasis.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## calculate a 3-level DWPT of the sunspots series 
W <- wavDWPT(sunspots, n.level=3)

## extract the level 1 basis 
W12 <- wavPacketBasis(W, 1:2)

## obtain the names of the crystals that were 
## extracted: "w1.0" "w1.1" 
names(W12$data)

## extract basis corresponding to crystal set: 
## "w2.0" "w2.1" "w1.1". This set comprises a 
## split-level basis 
Wsplit <- wavPacketBasis(W, c(3,4,2))
names(Wsplit$data)

wconstan/wmtsa documentation built on May 4, 2019, 2:03 a.m.