getRidgeLength: Estimate the length of the ridge

View source: R/getRidgeLength.R

getRidgeLengthR Documentation

Estimate the length of the ridge

Description

Estimate the length of the ridge line, which is composed of local maxima at adjacent CWT scales. The ridge line is cut off at the end point, whose amplitude divided by the maximum ridge amplitude is larger than the cutoff amplitude ratio threshold (0.5 by default).

Usage

getRidgeLength(ridgeList, Th = 0.5)

Arguments

ridgeList

a list of identified ridges

Th

the cutoff amplitude ratio (the amplitude divided by the maximum amplitude of the ridge) threshold of the ridge line end.

Value

a vector of estimated ridge length

Author(s)

Pan Du

Examples

stopifnot(getRidgeLength(list(c(5,4,3,2,1), c(5,3,1))) == c(3,2))

zeehio/MassSpecWavelet documentation built on May 6, 2023, 1:32 a.m.