Skip to contents

Integrates error spectra to get the variance(s) and optionally filters to simulate the case where a running mean has been passed over a proxy record.

Usage

IntegrateErrorSpectra(
  pes,
  method = "sincfilter",
  tau_smooth = NULL,
  thin.tau_smooth = TRUE
)

Arguments

pes

Object of class proxy.error.spec, e.g. output from ProxyErrorSpectrum

method

sinc filter is the only currently supported method

tau_smooth

temporal resolution to which the proxy timeseries is smoothed. If NULL, variance is returned at all odd multiples of delta_t

thin.tau_smooth

If TRUE and the vector of tau_smooth values is longer than 1000, these are thinned to 1000 values equally spaced on a log-scale

Value

timescale dependent variance object (dataframe)

Examples

spec.pars <- GetSpecPars("Mg_Ca", tau_p = 1 / 12, phi_c = 0, seas.amp = 4, T = 100 * 101)
spec.obj <- do.call(ProxyErrorSpectrum, spec.pars)
#> Warning: Rounding T to 10100 so that T is an odd integer multiple of delta_t
PlotSpecError(spec.obj, show.low.power.panel = FALSE)
#> Warning: There were 4 warnings in `summarise()`.
#> The first warning was:
#>  In argument: `max.spec = max(spec, na.rm = TRUE)`.
#>  In group 9: `component = "Climate"` and `ax.grp = "nu == 0"`.
#> Caused by warning in `max()`:
#> ! no non-missing arguments to max; returning -Inf
#>  Run `dplyr::last_dplyr_warnings()` to see the 3 remaining warnings.
#> Joining with `by = join_by(component, ax.grp)`
#> Warning: log-10 transformation introduced infinite values.
#> `geom_line()`: Each group consists of only one observation.
#>  Do you need to adjust the group aesthetic?

var.obj <- IntegrateErrorSpectra(spec.obj)
PlotTSDVariance(var.obj)
#> Warning: Removed 8 rows containing non-finite outside the scale range (`stat_align()`).


var.obj <- IntegrateErrorSpectra(spec.obj, tau_smooth = 1000)