pb210_inventory: Calculate cumulative lead-210 activity

View source: R/inventory.R

pb210_inventoryR Documentation

Calculate cumulative lead-210 activity

Description

The cumulative content of lead-210 from the bottom of the core is the basis for the constant rate of supply model, and is a required input to pb210_crs(). There are as many ways to calculate this as there are people who interpret lead-210 activities. This function models the bottom (below measured lead-210), middle (between measured values of lead-210), and top (above measured lead-210) with separate models to accomodate the variety of methods. By default, lead-210 activity is estimated for samples in which it was not measured by an exponential fit of lead-210 activity vs. cumulative dry mass (bottom), and repeating the maximum value (top). Inventory for all values is estimated using a trapezoidal approximation.

Usage

pb210_inventory(
  cumulative_dry_mass,
  excess,
  model_top = max_finite(excess),
  model_bottom = pb210_fit_loglinear(cumulative_dry_mass, excess, subset =
    ~finite_tail(..1, ..2, n_tail = 3))
)

pb210_inventory_calculator(
  model_top = ~max_finite(..2),
  model_bottom = ~pb210_fit_loglinear(..1, ..2, ~finite_tail(..1, ..2, n_tail = 3))
)

## S3 method for class 'inventory_calculator'
predict(object, cumulative_dry_mass, excess, ...)

Arguments

cumulative_dry_mass

The cumulative dry mass of the core (in kg), starting at the surface sample and including all samples in the core. These must be greater than 0 and in increasing order.

excess

An excess (non-erosional) lead-210 specific activity (in Bq/kg) for samples where this was measured, and NA where lead-210 was not measured. Use errors::set_errors() to use quadrature error propogation.

model_top

A fit object, such as one generated by pb210_fit_exponential() or a constant specifying the surface excess. The choice of this value has considerable impact on young dates.

model_bottom

A fit object that will be used to model activities below the last positive finite lead-210 activity. Use a constant to specify a custom deep inventory of lead-210. Can also be a lambda-function of cumulative_dry_mass, and excess. By default, this uses pb210_fit_loglinear() and finite_tail_prop() to generate an exponential fit using the last half of the finite values.

object

An inventory calculator generated by pb210_inventory_calculator().

...

Unused.

Value

pb210_inventory() returns a vector with errors::errors() of cumulative lead-210 activities for each sample (in Bq) that can be passed as the inventory to pb210_crs(). pb210_inventory_calculator() returns a fit object that can be used to calculate inventory given a cumulative_dry_mass and an excess.

Examples

fake_mass <- 1:10
fake_pb210 <- exp(5 - fake_mass)
pb210_inventory(fake_mass, fake_pb210)

# compare with known inventory from integrating
# exp(5 - fake_mass) to +Inf
exp(-1 * fake_mass  + 5) / -(-1)


paleolimbot/pb210 documentation built on May 8, 2022, 8:10 a.m.