remove_SignalBackground {Luminescence} | R Documentation |
Remove Signal Background from RLum.Data.Curve
Objects
Description
Convenient (background) of luminescence curves using merge_RLum
Usage
remove_SignalBackground(
object,
object_bg = NULL,
recordType = NULL,
clean_up = TRUE
)
Arguments
object |
RLum.Analysis (required): A non-empty RLum.Analysis object with, e.g., OSL/IRSL/TL curves or a list of such object. If a list is provided non-conform list elements are silently removed from the list |
object_bg |
RLum.Data.Curve, a list of such objects, a matrix or numeric (optional):
Sets the background as a curve that is subtracted from the record types set with |
recordType |
character (optional): provide the |
clean_up |
logical (with default): enable/disable background curve removal
after background subtraction. If |
Details
The function aims to simplify a frequently encountered task: subtracting curves or backgrounds from luminescence curves, such as OSL, TL, or RF. The function presumes that if curves are presented in pairs, for instance, TL - TL, the second curve represents a background signal that needs to be removed from the first curve. Following the removal, the background curve is discarded from the dataset. Alternatively, custom background curves can be provided, which are then utilised for the subtraction. In essence, the function utilises the merge_RLum function but simplifies the selection of pairs and curves.
Value
Returns an RLum.Analysis object or a list of such objects.
Function version
0.1.0
How to cite
Kreutzer, S., 2025. remove_SignalBackground(): Remove Signal Background from RLum.Data.Curve Objects. Function version 0.1.0. In: Kreutzer, S., Burow, C., Dietze, M., Fuchs, M.C., Schmidt, C., Fischer, M., Friedrich, J., Mercier, N., Philippe, A., Riedesel, S., Autzen, M., Mittelstrass, D., Gray, H.J., Galharret, J., Colombo, M., Steinbuch, L., Boer, A.d., 2025. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 1.1.0. https://r-lum.github.io/Luminescence/
Author(s)
Sebastian Kreutzer, Institute of Geography, Heidelberg University (Germany) , RLum Developer Team
See Also
get_RLum, merge_RLum, RLum.Analysis,RLum.Data.Curve
Examples
## load example dataset
xsyg <- read_XSYG2R(
system.file("extdata/XSYG_file.xsyg", package = "Luminescence"),
fastForward = TRUE,
verbose = FALSE)
## remove constant background from OSL curves
remove_SignalBackground(
object = xsyg,
object_bg = 100,
recordType = "OSL (UVVIS)")
## use a more elaborate examples
## with two TL curves (2nd is background)
xsyg_v1 <- set_RLum("RLum.Analysis", records = c(
rep(xsyg[[1]]@records[[1]], 2),
xsyg[[1]]@records[[4]],
xsyg[[1]]@records[[4]],
rep(xsyg[[1]]@records[[10]], 2),
xsyg[[1]]@records[[4]],
xsyg[[1]]@records[[4]]))
## remove background and strip background
## curves from the object
o <- remove_SignalBackground(
object = xsyg_v1,
recordType = "TL (UVVIS)")