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.

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 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)
#> [1] 59.073374219 21.731530741 7.994234230 2.940565266 1.081424352 #> [6] 0.397484632 0.145877269 0.053316094 0.019264740 0.006737947
# compare with known inventory from integrating # exp(5 - fake_mass) to +Inf exp(-1 * fake_mass + 5) / -(-1)
#> [1] 54.598150033 20.085536923 7.389056099 2.718281828 1.000000000 #> [6] 0.367879441 0.135335283 0.049787068 0.018315639 0.006737947