transform_y_vals: Transform the y-axis from position to depth in meters

View source: R/dive_tidy_functions.R

transform_y_valsR Documentation

Transform the y-axis from position to depth in meters

Description

Transforms the y-axis of the record from position to depth, using either the psi calibration curve at the end of the record, or a known maximum depth for that record.

Usage

transform_y_vals(
  trace,
  max_depth = NULL,
  psi_calibration = NULL,
  max_psi = NULL,
  max_position = NULL
)

Arguments

trace

tidy trace data frame after arc removal, contains the x and y values of the trace.

max_depth

maximum depth of trace in meters, if psi calibration curve is not present.

psi_calibration

data frame containing the centered psi calibration curve.

max_psi

maximum psi of the TDR, often not captured in psi calibration curve.

max_position

position of maximum psi reading for TDR in cm.

Value

trace data frame with depth in meters.

Examples

## Not run: 
# if the record has a psi calibration curve at the end:
trace <- transform_psitodepth(trace, psi_calibration,
max_psi = 900, max_position = 22.45)

# if only the maximum depth is known:
trace <- trace(trace, max_depth = 317)

## End(Not run)

EmmaLiTsai/recoverKBTDR documentation built on Aug. 29, 2024, 10:38 a.m.