EarthSystemDiagnostics / TrenchR

An R package to analyse and plot trench-like proxy records
Other
0 stars 0 forks source link

Make direction of estimation a function parameter in `estimateTrenchDecorrelation()` #14

Open thomas-muench opened 5 days ago

thomas-muench commented 5 days ago

Currently, estimateTrenchDecorrelation() calculates the decorrelation length in both trench directions, so that in case you wanna estimate a certain direction only, you need to subset the result accordingly via $lambda[1] or $lambda[2], which is a bit cumbersome and unintuitive. For the same reason, you cannot pipe the decorrelation length directly into getEffectiveTrenchDOF(), although the latter function calculates the DOF only for a certain direction, i.e. expecting a single decorrelation length value.

A more straightforward workflow to estimate the DOF in any direction would thus be

estimateTrenchDecorrelation(data, direction = "horizontal") %>% # or 'direction = "vertical"'
  getEffectiveTrenchDOF(...)