signal_correct {alkahest} | R Documentation |
Baseline Correction
Description
Baseline Correction
Usage
signal_correct(x, y, ...)
## S4 method for signature 'numeric,numeric'
signal_correct(
x,
y,
method = c("linear", "polynomial", "asls", "rollingball", "rubberband", "SNIP", "4S"),
...
)
## S4 method for signature 'ANY,missing'
signal_correct(
x,
method = c("linear", "polynomial", "asls", "rollingball", "rubberband", "SNIP", "4S"),
...
)
Arguments
x , y |
A |
... |
Extra arguments to be passed to |
method |
A |
Details
Available methods for baseline estimation:
asls
Asymmetric Least Squares Smoothing (see
baseline_asls()
).linear
Linear baseline estimation (see
baseline_linear()
).polynomial
Polynomial baseline estimation (see
baseline_polynomial()
).rollingball
Rolling ball baseline estimation (see
baseline_rollingball()
).rubberband
Rubberband baseline estimation (see
baseline_rubberband()
).SNIP
Sensitive Nonlinear Iterative Peak clipping algorithm (see
baseline_snip()
).4S
4S Peak Filling (see
baseline_peakfilling()
).
Value
Returns a list
with two components x
and y
.
Author(s)
N. Frerebeau
See Also
Other signal processing methods:
signal_bind()
,
signal_drift()
,
signal_mean()
,
signal_shift()
,
subset()
Examples
## gamma-ray spectrometry
data("BEGe")
## Subset from 2.75 to 200 keV
BEGe <- signal_select(BEGe, from = 3, to = 200)
## Drift
baseline <- baseline_snip(BEGe)
BEGe_drif <- signal_drift(BEGe, lag = baseline, subtract = TRUE)
plot(BEGe, type = "l", xlab = "Energy (keV)", ylab = "Count")
lines(BEGe_drif, type = "l", col = "red")
## Correct
BEGe_corr <- signal_correct(BEGe, method = "SNIP")
plot(BEGe, type = "l", xlab = "Energy (keV)", ylab = "Count")
lines(BEGe_corr, type = "l", col = "red")