traceAverage: Trace average (DEPRECATED, use 'traceStat' instead)

traceAverageR Documentation

Trace average (DEPRECATED, use 'traceStat' instead)

Description

Average traces in a radargram along the distance (horizontal) axis using a moving window. This can be used to increase signal to noise ratio. Note that if the moving window length is not defined, all traces are averaged into one single trace.

Usage

## S4 method for signature 'GPR'
traceAverage(x, w = NULL, FUN = mean, ..., track = TRUE)

Arguments

x

An object of the class GPR

w

A length-one integer vector equal to the window length of the average window. If w = NULL a single trace corresponding to the average trace of the whole profile is returned.

FUN

A function to compute the average (default is mean)

...

Additional parameters for the FUN functions

Value

An object of the class GPR. When w = NULL, this function returns a GPR object with a single trace corresponding to the average trace of the whole radargram. When w is equal to a strictly positive interger this function returns a GPR object with a size identical to x where each trace corresponds to the average of the w neighbouring traces centered on the considered trace.

Examples

data("frenkeLine00")

f0 <- frenkeLine00

f1 <- traceAverage(f0)
plot(f1)
# substract the average trace
plot(f0 - f1)

f2 <- traceAverage(f0, w = 20)
plot(f2)
plot(f0 - f2)

f3 <- traceAverage(f0, w = 20, FUN = median)
plot(f3)
plot(f0 - f3)

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