pb210_simulate_accumulation()
simulates the accumulation of lead-210 over
time, returning a data frame with one row per time_step
, whereas
pb210_simulate_core()
returns a data frame with one row per depth_step
(like extruding a core). These functions were created to test the
pb210_crs()
and pb210_cic()
functions, and to create
the lead-210 theory vignette. Ages are in years, depths are in cm,
masses are in kg, densities are in kg / m^3^, and specific activities
are in Bq / kg. pb210_simulate_counting()
simulates putting a subsample
of each slice on a counter for a specified amount of time. This allows
assigning an error to the known lead-210 activity, as well as provide
more realistic data for simulations. See pb210_error_from_activity()
for details.
pb210_simulate_accumulation( mass_accumulation = pb210_mass_accumulation_constant(), max_age = 500, time_step = 1, supply = pb210_supply_constant(), compressibility = pb210_compressibility_constant(), initial_density = pb210_density_constant(), decay_constant = pb210_decay_constant() ) pb210_simulate_core( accumulation = pb210_simulate_accumulation(), depth_step = rep(0.5, 60), core_area = pb210_core_area() ) pb210_simulate_counting( accumulation = pb210_simulate_core(), count_mass = 0.5/1000, count_time = lubridate::ddays(1) )
mass_accumulation | A function such as that generated by |
---|---|
max_age | The maximum age of the simulation (years) |
time_step | The time to consider in each step (years) |
supply | A function such as that generated by |
compressibility | A function such as that generated by |
initial_density | A function such as that generated by |
decay_constant | The decay constant to use (see |
accumulation | An age simulation, created by |
depth_step | A vector of depth steps to consider, from the top to the bottom of the core. There should be one element in the vector for each slice considered. |
core_area | The internal area of the core in m^2^. |
count_mass | The amount of mass each sample that was counted (kg). Can be a vector to specify different masses for each sample. |
count_time | The time each sample was counted, as resolved by
|
A tibble with columns:
age (years): the mean age of the slice (weighted by mass)
depth (cm): the midpoint depth of the slice
activity (Bq/kg)
age_top, age_bottom (years)
depth_top, depth_bottom (cm)
slice_mass (kg)
slice_density (kg / m^3^)
The output of pb210_simulate_counting()
also includes the columns:
activity_estimate (Bq/kg): A plausible activity that might be
obtained by a lead-210 counting method, sampled using stats::rpois()
.
activity_se (Bq/kg): The standard error (estimate of the standard
deviation) of activity_estimate. For the expected error,
use pb210_error_from_activity()
on
# 1 row per year accumulation <- pb210_simulate_accumulation() # 1 row per 0.5 cm core <- pb210_simulate_core(accumulation) counted_core <- pb210_simulate_counting(core)