time0Cor: Time zero correction

time0CorR Documentation

Time zero correction

Description

time0Cor shift the traces vertically such that they start at time zero (time zero of the data can be modified with the function). New traces are interpolated.

Usage

## S4 method for signature 'GPR'
time0Cor(
  x,
  t0 = NULL,
  method = c("pchip", "linear", "nearest", "spline", "cubic", "none"),
  crop = TRUE,
  keep = 0,
  track = TRUE
)

Arguments

x

[GPR class] An object of the class GPR

t0

[DEPRECATED] DEPRECATED - NO MORE USED. Instead, set time-zero with either time0(x) <- ... or x <- setTime0(x, ...).

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).

keep

[DEPRECATED] DEPRECATED - NO MORE USED.

Details

This function is a wrapper for the following commands

  • ts <- -t0 + keep (or if t0 is NULL, ts <- -time0(x) + keep)

  • x <- traceShift( x, ts, method = method, crop = crop)

  • time0(x) <- time0(x) + ts

Modified slots

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

  • time0: set to 0.

  • proc: updated with function name and arguments.

Value

[GPR class] An object of the class GPR

See Also

firstBreak to estimate the first wave break; firstBreakToTime0 to convert the first wave break into time zero. time0 and setTime0 to set time-zero; traceShift to shift the traces

Examples

data(frenkeLine00)
tfb <- firstBreak(frenkeLine00)
t0 <- firstBreakToTime0(tfb, frenkeLine00, c0 = 0.299)
time0(frenkeLine00) <- t0
frenkeLine00_2 <- time0Cor(frenkeLine00, method = "pchip")


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