envelope: Amplitude envelope

envelopeR Documentation

Amplitude envelope

Description

Estimate for each trace the amplitude envelope with the Hilbert transform (instataneous amplitude).

Usage

## S4 method for signature 'GPR'
envelope(x, method = c("peak", "hilbert"), npad = 100, threshold = 2)

Arguments

x

An object of the class GPR.

method

[character] Method to use. See details.

npad

[integer(1)] Only for method = "hilbert". Positive value defining the number of values to pad x (the padding help to minimize the Gibbs effect at the beginning and end of the data caused by the Hilbert transform).

threshold

[numeric(1)] Threshold value for peak detection. The larger the value, the longer the computation time.

Details

Two methods:

  • hilbert Envelope based on the Hilbert transform

  • peak The local maxima of the absolute values of the signal are first estimated. The envelope is determined using spline interpolation over local maxima.

Examples

x <- frenkeLine00

plot(x[,10], lwd = 2)
lines(abs(x[,10]), col = "blue")
lines(envelope(x[,10], method = "hilbert"), col = "red")
lines(envelope(x[,10], method = "peak"), col = "green")


emanuelhuber/RGPR documentation built on May 13, 2024, 9:31 p.m.