View source: R/simulate_OSLcomponents.R
simulate_OSLcomponents | R Documentation |
This function builds a bulk CW-OSL curve and CW-OSL component decay curves from OSL component parameters. Therewith it supports fit_OSLcurve, decompose_OSLcurve and plot_OSLcurve by providing model and residual curves.
simulate_OSLcomponents(
components,
curve = NULL,
channel.width = 0.1,
channel.number = 400,
simulate.curve = FALSE,
add.poisson.noise = TRUE,
add.gaussian.noise = 0,
add.background = 0,
round.values = TRUE
)
components |
data.frame (required):
Table with component parameters. The table requires columns |
curve |
data.frame (optional):
CW-OSL curve serving as template for the time axis. The input table requires a column |
channel.width |
numeric (optional):
Channel width in seconds. Necessary for curve simulation if |
channel.number |
numeric (optional):
Number of channels resp. data points. Necessary for curve simulation if |
simulate.curve |
logical (with default):
Decides if the bulk CW-OSL signal shall be calculated from the component parameter.
If |
add.poisson.noise |
logical (with default):
Adds poisson distributed shot noise to |
add.gaussian.noise |
numeric (with default):
Standard deviation of the detector noise in cts/s, added to |
add.background |
numeric (with default):
signal background level in cts/s, added to |
round.values |
logical (with default):
Rounds |
A data.frame of a CW-OSL curve with the columns: $time
, $signal
, $residual
, $sum
and a signal decay curve for each single component named after the entries in the column components$names
of the input object.
2020-10-30, DM: Renamed from simulate_OSLcurve to simulate_OSLcomponents; Renamed argument from template.curve to curve; Rewrote roxygen documentation
Dirk Mittelstraß, dirk.mittelstrass@luminescence.de
Please cite the package the following way:
Mittelstraß, D., Schmidt, C., Beyer, J., Heitmann, J. and Straessner, A.: R package OSLdecomposition: Automated identification and separation of quartz CW-OSL signal components, in preparation.
Mittelstraß, D., 2019. Decomposition of weak optically stimulated luminescence signals and its application in retrospective dosimetry at quartz (Master thesis). TU Dresden, Dresden.
fit_OSLcurve, decompose_OSLcurve, plot_OSLcurve
# Set some arbitrary decay parameter for a dim CW-OSL measurement of quartz
components <- data.frame(name = c("fast", "medium", "slow"),
lambda = c(2, 0.5, 0.02),
n = c(1000, 1000, 10000))
# Simulate the CW-OSL curve and add some signal noise
curve <- simulate_OSLcomponents(components, simulate.curve = TRUE, add.poisson.noise = TRUE)
# Display the simulated curve
plot_OSLcurve(curve, components)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.