optim_align_par: Estimate channel alignment parameter (R workflow)

View source: R/alignment_functions.R

optim_align_parR Documentation

Estimate channel alignment parameter (R workflow)

Description

Estimate optimal alignment parameter for a channel (e.g. "temperature") within a range of candidate alignment offsets. The 'best' alignment is taken to be the one that maximizes the correlation between channels.

Usage

optim_align_par(
  x,
  cast_direction,
  variable = "temperature",
  offsets = seq(-1, 1, 0.01),
  cor_method = "pearson",
  ...
)

Arguments

x

oce object

cast_direction

Cast direction as a character vector ("downcast" or "upcast"). Passed to gapctd::slowdown()

variable

Variable to be aligned ("temperature")

offsets

Numerical vector of offsets to evaluate, in seconds.

cor_method

Correlation method, passed to gapctd::channel_correlation().

...

Additional arguments passed to gapctd::channel_correlation()

Value

A named numeric vector containing the estimated optimal offset ("best_offset") and correlation for the offset ("best_corr")

Author(s)

Sean Rohan


afsc-gap-products/gapctd documentation built on March 5, 2025, 3:42 a.m.