| normalize | R Documentation |
This function implements normalization methods based on background, total area, internal standard, and the L1, L2 and maximum norms of each spectrum.
normalize(
x,
method = "area",
bkg = NULL,
wlength = NULL,
drop_na = TRUE,
drop.na = deprecated()
)
x |
A numeric matrix or data frame containing the spectra. |
method |
A character vector specifying the normalization method to apply. Available methods are: "area", "l1", "l2", "max", "background", and "internal". Spectra whose L1, L2 or maximum norm is zero are set to |
bkg |
A numeric matrix or data frame of the same dimension as |
wlength |
A character vector of the selected wavelength(s) (column names). Required for the "internal" method, where the intensities at these wavelengths are summed to give the internal standard. Optional for the "background" method, where only these wavelengths are normalized and returned. |
drop_na |
A logical value indicating whether to remove spectra (rows) containing missing values before normalizing. Default is |
drop.na |
The normalization methods:
Normalization to the background: Spectra are divided by the intensity of the background emission. Note that it is recommended that the detector dark current be subtracted prior to the normalization.
Normalization to the total area: Each spectrum is divided by the total area of the spectrum over the whole spectral range. The detector dark current must be subtracted prior to this normalization. The total area is calculated as the sum of all intensity levels.
L1 normalization ("l1"): each spectrum is divided by the sum of
the absolute values of its intensities. It equals the total area for
non-negative spectra, and also suits derivative spectra, whose values
change sign.
L2 (vector) normalization ("l2"): each spectrum is divided by
its Euclidean norm, so that its sum of squares is 1. Unlike SNV, the
spectrum is not centered.
Maximum normalization ("max"): each spectrum is divided by its
largest absolute intensity, so that its strongest feature is 1 (or
-1).
Normalization to an internal standard: The peak intensity (or area) of the emission line related to the analyte is divided by the peak intensity (or area) of a selected emission line related to the internal standard. The internal standard concentration is assumed constant or known.
A tibble of normalized spectra.
Christian L. Goueguel
De Giacomo, A., Dell’Aglio, M., De Pascale, O., Gaudiuso, R., Santagata, A., Teghil, R., (2008). Laser-induced breakdown spectroscopy methodology for the analysis of copper based alloys used in ancient artworks. Spectrochimica Acta Part B, 63(5):585-590
Body, D., Chadwick, B.L., (2001). Optimization of the spectral data processing in a LIBS simultaneous elemental analysis system. Spectrochimica Acta Part B, 56(6):725-736.
Rinnan, A., Van den Berg, F., Balling Engelsen, S., (2009). Review of the most common preprocessing techniques for near-infrared spectra, Trends in Analytical Chemistry, 28(10):1201-1222.
data(forageLIBS)
spectra <- forageLIBS[-(1:14)] # the spectral channels
normalize(spectra[1:3, ], method = "area")[, 1:4]
normalize(spectra[1:3, ], method = "l2")[, 1:4]
# internal standard: the C I 247.86 nm line of the organic matrix
carbon <- names(spectra)[which.min(abs(as.numeric(names(spectra)) - 247.856))]
normalize(spectra[1:3, ], method = "internal", wlength = carbon)[, 1:4]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.