wavCWTPeaks(x, snr.min=3, scale.range=NULL, length.min=10,
noise.span=NULL, noise.fun="quantile", noise.min=NULL)
wavCWTTree
.scale.range
needed in order for that branches peak to be considered a peak candidate.
Default: 10
.quantile(attr(x,"noise"), prob=0.05)
,
where x
is the input wavCWTTree
object.NULL,max(0.01 * diff(range(times)), 5*sampling.interval)
,
where times
and s
scale[range(which(branch.hist > quantile(branch.hist,prob=0.8)))]
, where branch.hist
is an
attribute of the input wavCW
3
.x
and y
vectors identifying the peaks in the original time series.
The pruning criteria (snr.min
, scale.range
, length.min
, noise.span
, noise.fun
, noise.min
)
are attached are attached as attributes. In addition, a peaks
attribute is
attached and corresponds to a data.frame
containing the following information for each peak:wavCWTTree
function. The wavCWTpeaks
function prunes the branches of the
input CWT tree and records the termination time (i.e., the time associated with
point of the branch that is closest to scale zero) as the time index associated
with the local peak of the corresponding time series. Information regarding the collection of isolated peaks
is returned as a data.frame
object.The tree branches are pruned in the following ways: [object Object],[object Object],[object Object],[object Object]
NOTE: For peak detection, the wavelet filters used to form the CWT must maintain an (approximate) zero phase
property so that the CWT coefficients can be meaningfully aligned with the events of the original
time series. Currently, only the so-called Mexican hat wavelet maintains this property due to
the even-symmetry of the filter's impulse response. Therefore, only the Mexican hat wavelet ("gaussian2")
is currently supported for CWT-based peak detection. See the wavCWTFilters
and wavCWT
function for more information.
J.F. Muzy, E. Bacry, and A. Arneodo., ``The multifractal formalism revisited with wavelets.", International Journal of Bifurcation and Chaos, 4, 245--302 (1994).
wavCWTTree
, wavCWT
, wavCWTFilters
.## create linchirp series
linchirp <- make.signal("linchirp")
## calculate the CWT
W <- wavCWT(linchirp)
## form CWT tree
z <- wavCWTTree(W)
## estimate the peak locations using default
## scale.range
p <- wavCWTPeaks(z)
## plot an overlay of the original series and the
## peaks
x <- as(linchirp@positions,"numeric")
y <- linchirp@data
plot(x, y, type="l", xlab="time", ylab="linchirp")
points(p, pch=16, col="red", cex=1.2)
Run the code above in your browser using DataLab