Learn R Programming

RSEIS (version 2.6-0)

wlet.do: Return Wavelet transform

Description

Wavelet transform

Usage

wlet.do(why, dt, noctave = 6, nvoice = 20, flip = TRUE, ploty = TRUE, zscale = 1, col = terrain.colors(100), STAMP = STAMP)

Arguments

Value

  • bahalist: wavelet transform image, noctave = number of octaves, nvoice = number of voices, flip = logical, whether image is flipped (default=TRUE)
  • PEplotting information list: why=y-axis, dt=time series sample, interval, zscale=(1,2,3) image scaling, col=color map, ygrid = logical(default=FALSE), STAMP = character string

Details

wlet.do uses the cwt (package:Rwave) code to calculate the continuous wavelet transform, but plots it differently. Morelet wavelet is used by default. The cwt produces an image, the modulus of the transform, which is passed on to wlet.do along with the number of octaves and the number of voices. Plotting parameters are passed to the function so that replotting can be accomplished (use plotwlet) without having to recalculate the transform.

See Also

Rwave, cwt , plotwlet, contwlet , pwlet2freqs, wlet.drive

Examples

Run this code
data(CE1)

plot(CE1$x, CE1$y, type='l')

require(Rwave)

out = wlet.do(CE1$y, CE1$dt, flip = FALSE, ploty = TRUE)

####  show with different scalings:
plotwlet(out$baha, CE1$y, CE1$dt , zscale=3,  col=rainbow(100) ,  ygrid=FALSE)

plotwlet(out$baha, CE1$y, CE1$dt , zscale=1,  col=terrain.colors(100) ,
ygrid=TRUE)

##############  add frequency scale on the right hand side of image
pfreqs = c(0.5, 1, 2,3,4,5, 10, 14)

     zp = pwlet2freqs(noctave=out$baha$noctave , nvoice=out$baha$nvoice,
CE1$dt,
flip = TRUE, pfreqs, plot = TRUE,
perc = 0.85)

Run the code above in your browser using DataLab