rmBackground | R Documentation |
rmBackground
is a generic function used to produce results defined
by an user function. The user function is applied accross traces (horizontal)
using a moving window. Note that if the moving window length is not defined,
all traces are averaged into one single trace (the results is similar to
apply(x, 1, FUN, ...)
. rmBackground
is a wrapper for
x - traceStat(...)
## S4 method for signature 'GPR'
rmBackground(x, w = NULL, FUN = mean, ..., track = TRUE)
x |
An object of the class GPR |
w |
A length-one integer vector equal to the window length of the
average window. If |
FUN |
A function to compute the average (default is |
... |
Additional parameters for the FUN functions |
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.
data("frenkeLine00")
f0 <- frenkeLine00
# substract the average trace
f1 <- rmBackground(f0)
f2 <- rmBackground(f0, w = 20)
plot(f2)
f3 <- rmBackground(f0, w = 20, FUN = median)
plot(f3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.