smooth_trace_dive: Spline smoothing to reduce record transducer noise

View source: R/dive_tidy_functions.R

smooth_trace_diveR Documentation

Spline smoothing to reduce record transducer noise

Description

The transducer arm often produced extra chatter at depth = 0, from when there was less tension on the arm. This function spline smoothes the data to account for this noise by using a dive detector such that resolution of spline smoothing increases when a dive is detected, and less when the seal is resting. This reduces noise in depth = 0, while retaining post-dive surface interval information.

Usage

smooth_trace_dive(trace, spar_h = 0.3, depth_thresh = 5)

Arguments

trace

tidy trace data frame after arc removal, contains time and depth of the trace.

spar_h

higher-resolution spar value to use during a dive. This can either be visually determined, but computation methods are available in find_best_spar(). Default set to 0.3.

depth_thresh

depth(m) threshold to use for when a dive is detected. Default set to 5 meters.

Value

data frame with depth_smooth, which is the depth of the record when smoothed.

Examples

## Not run: 
trace <- smooth_trace_dive(trace, spar_h = 0.3, depth_thresh = 5)

## End(Not run)

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