baseline | R Documentation |
Baseline Estimation and Removal
signal_baseline(object, ...)
signal_correct(object, ...)
baseline_snip(object, ...)
baseline_rubberband(object, ...)
baseline_linear(object, ...)
## S4 method for signature 'GammaSpectrum'
signal_baseline(object, method = c("SNIP", "rubberband", "linear"), ...)
## S4 method for signature 'GammaSpectra'
signal_baseline(object, method = c("SNIP", "rubberband", "linear"), ...)
## S4 method for signature 'GammaSpectrum'
signal_correct(object, method = c("SNIP", "rubberband", "linear"), ...)
## S4 method for signature 'GammaSpectra'
signal_correct(object, method = c("SNIP", "rubberband", "linear"), ...)
## S4 method for signature 'GammaSpectrum'
baseline_linear(object, from = NULL, to = NULL)
## S4 method for signature 'GammaSpectra'
baseline_linear(object, from = NULL, to = NULL)
## S4 method for signature 'GammaSpectrum'
baseline_rubberband(object, noise = 0, spline = TRUE, ...)
## S4 method for signature 'GammaSpectra'
baseline_rubberband(object, noise = 0, spline = TRUE, ...)
## S4 method for signature 'GammaSpectrum'
baseline_snip(object, LLS = FALSE, decreasing = FALSE, n = 100, ...)
## S4 method for signature 'GammaSpectra'
baseline_snip(object, LLS = FALSE, decreasing = FALSE, n = 100, ...)
object |
A GammaSpectrum or GammaSpectra object. |
... |
Extra parameters to be passed to further methods. |
method |
A |
from |
An |
to |
An |
noise |
A length-one |
spline |
A |
LLS |
A |
decreasing |
A |
n |
An |
The following methods are available for baseline estimation:
SNIP
Sensitive Nonlinear Iterative Peak clipping algorithm.
rubberband
A convex envelope of the spectrum is determined and the baseline is estimated as the part of the convex envelope lying below the spectrum. Note that the rubber band does not enter the concave regions (if any) of the spectrum.
linear
Linear baseline estimation.
baseline_*()
returns a BaseLine object.
signal_correct()
returns a corrected GammaSpectrum or
GammaSpectra object (same as object
).
baseline_rubberband()
is slightly modified from C. Beleites'
hyperSpec::spc.rubberband()
.
N. Frerebeau
Liland, K. H. (2015). 4S Peak Filling - baseline estimation by iterative mean suppression. MethodsX, 2, 135-140. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.mex.2015.02.009")}.
Morháč, M., Kliman, J., Matoušek, V., Veselský, M. & Turzo, I. (1997). Background elimination methods for multidimensional gamma-ray spectra. Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, 401(1), p. 113-132. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/S0168-9002(97)01023-1")}
Morháč, M. & Matoušek, V. (2008). Peak Clipping Algorithms for Background Estimation in Spectroscopic Data. Applied Spectroscopy, 62(1), p. 91-106. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1366/000370208783412762")}
Ryan, C. G., Clayton, E., Griffin, W. L., Sie, S. H. & Cousens, D. R. (1988). SNIP, a statistics-sensitive background treatment for the quantitative analysis of PIXE spectra in geoscience applications. Nuclear Instruments and Methods in Physics Research Section B: Beam Interactions with Materials and Atoms, 34(3), p. 396-402. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/0168-583X(88)90063-8")}
Other signal processing:
peaks_find()
,
peaks_search()
,
signal_integrate()
,
signal_slice()
,
signal_split()
,
signal_stabilize()
,
smooth()
## Import a CNF file
spc_file <- system.file("extdata/LaBr.CNF", package = "gamma")
spc <- read(spc_file)
## Remove the first 35 channels
spc <- signal_slice(spc, -c(1:35))
## Linear baseline
bsl_linear <- baseline_linear(spc, from = 250, to = 750)
plot(spc, bsl_linear)
## SNIP baseline
bsl_snip <- baseline_snip(spc, LLS = FALSE, decreasing = FALSE, n = 100)
plot(spc, bsl_snip)
## Rubberband baseline
bsl_rubber <- baseline_rubberband(spc)
plot(spc, bsl_rubber)
## Remove baseline
spc_clean1 <- signal_correct(spc)
spc_clean2 <- spc - bsl_snip
all(spc_clean1 == spc_clean2)
plot(spc_clean1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.