align: Align Wavelet Transform Coefficients

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/align.R

Description

Aligns both wavelet (high pass) and scaling (low pass) coefficients of objects of class dwt, modwt, dwpt, and modwpt using phase shift values computed by wt.filter.shift.

Usage

1
align(wt, coe=FALSE, inverse=FALSE)

Arguments

wt

An object of class dwt, modwt, dwpt, or modwpt.

coe

Logical value indicating whether to use center of energy method in computing phase shifts.

inverse

Logical value indicating whether to shift wavelet and scaling coefficients of an aligned object back to their original positions.

Details

An object of class dwt, modwt, is characterized as 'unaligned' if the value in the aligned slot is FALSE. Similarly, these objects are classified as 'aligned' if the value in the aligned slot is TRUE. Thus, align will only operate on an 'unaligned' wavelet transform object if inverse = FALSE and on an 'aligned' wavelet transform object if inverse = TRUE.

The argument coe is passed to the wt.filter.shift function to determine what method to use for computing phase shifts (see documentation for wt.filter.shift).

Value

Either an aligned or unaligned object of the same class as wt (see Details above).

Author(s)

Eric Aldrich. ealdrich@gmail.com.

References

Percival, D. B. and A. T. Walden (2000) Wavelet Methods for Time Series Analysis, Cambridge University Press.

See Also

wt.filter.shift, dwt, modwt.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# obtain the two series listed in Percival and Walden (2000), page 42
X1 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,.7,.9,0,.3)
X2 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,-.7,.9,0,.3)

# combine them and compute DWT
newX <- cbind(X1,X2)
wt <- dwt(newX, n.levels=3, boundary="reflection", fast=FALSE)

# align
wt.aligned <- align(wt)

Example output



wavelets documentation built on March 26, 2020, 6:50 p.m.

Related to align in wavelets...