cwt_iw {SynchWave}R Documentation

Inverse Wavelet Transform

Description

This function performs the inverse wavelet transform of signal Wx.

This code is translated from MATLAB Synchrosqueezing Toolbox, version 1.1 developed by Eugene Brevdo (http://www.math.princeton.edu/~ebrevdo/).

Usage

cwt_iw(Wx, type, opt=NULL)

Arguments

Wx

wavelet transform of a signal, see cwt_fw.

type

wavelet used to take the wavelet transform, see cwt_fw and wfiltfn.

opt

options list used for forward wavelet transform.

Details

This function performs the inverse wavelet transform of signal Wx, and implements Eq. (4.67) of [1].

Value

x

the signal, as reconstructed from Wx.

References

[1] Mallat, S (2009) A Wavelet Tour of Signal Processing, New York: Academic Press.

See Also

cwt_fw, wfiltfn, est_riskshrink_thresh.

Examples

tt <- seq(0, 10, , 1024)
nv <- 32
f0 <- (1+0.6*cos(2*tt))*cos(4*pi*tt+1.2*tt^2)
sigma <- 0.5
f <- f0 + sigma*rnorm(length(tt))

# Continuous wavelet transform
opt <- list(type = "bump")
cwtfit <- cwt_fw(f, opt$type, nv, tt[2]-tt[1], opt)

# Hard thresholing
thresh <- est_riskshrink_thresh(cwtfit$Wx, nv)
cwtfit$Wx[which(abs(cwtfit$Wx) < thresh)] <- 0.0

# Reconstruction 
opt$gamma <- thresh
cwtrec <- cwt_iw(cwtfit$Wx, opt$type, opt)

par(mfrow=c(1,1))
plot(tt, f, type="p", lty=2, xlab="time", ylab="f", col="red", cex=0.1)
lines(tt, f0, col="blue")
lines(tt, cwtrec)

[Package SynchWave version 1.1.2 Index]