traceShift: Shift trace vertically

traceShiftR Documentation

Shift trace vertically

Description

Shift traces vertically by an amount of depth (time) units. New traces are interpolated.

Usage

## S4 method for signature 'GPR'
traceShift(
  x,
  ts,
  method = c("pchip", "linear", "nearest", "spline", "cubic", "none"),
  crop = TRUE,
  track = TRUE
)

Arguments

x

[GPR class] An object of the class GPR

ts

[numeric] Amount of time (or depth, depending on the trace unit) to shift the traces. ts is eiter a single value (all the traces are shifted by the same amount ts) or a vector with m elements (m is equal to the number of traces).

method

[character(1)] Interpolation method to be applied (one of pchip linear, nearest, spline, cubic, none, see also interp1). "none" means that the trace is shifted by the amount of trace samples the closest to ts without interpolation.

crop

[logical(1)] If TRUE (default), remove the rows containing only zero's (no data).

Details

Modified slots

  • data: trace shifted. The number of rows of data may be smaller if crop = TRUE.

  • proc: updated with function name and arguments.

Value

[GPR class] An object of the class GPR.

See Also

time0Cor to shift the traces such that they start at time-zero.


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