View source: R/remove_SignalBackground.R
remove_SignalBackground | R Documentation |
RLum.Data.Curve
ObjectsConvenient (background) of luminescence curves using merge_RLum
remove_SignalBackground(
object,
object_bg = NULL,
recordType = NULL,
clean_up = TRUE
)
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 |
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.
Returns an RLum.Analysis object or a list of such objects.
0.1.0
Sebastian Kreutzer, Institute of Geography, Heidelberg University (Germany)
get_RLum, merge_RLum, RLum.Analysis,RLum.Data.Curve
## 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)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.