Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

continuum_removal

Continuum removal


Description

Operates a continuum removal on a vector.

Usage

continuum_removal(x, wl = as.numeric(names(x)), upper = TRUE)

Arguments

x

a numeric vector

wl

the wavelengths of the spectra

upper

if TRUE, removes the upper convex hull from the spectra, if FALSE, takes the lower convex hull

Details

This operation is commonly done to normalize reflectance spectra and allow comparison of individual absorption features from a common baseline. The removal is based on the upper convex hull of the spectra.

This function is working on vectors. It may applied on matrix or data.frames using the apply function, or on Spectra* objects using the apply_spectra function.

Value

A numeric vector with its continuum removed.

Author(s)

Pierre Roudier pierre.roudier@gmail.com, based on code from Raphael Viscarra-Rossel.

References

Clark, R.N., and Roush, T.L. 1984. Reflectance spectroscopy: Quantitative analysis techniques for remote sensing applications. Journal of Geophysical Research 89, 6329–6340.

See Also

Examples

# Loading example data
data(australia)
spectra(australia) <- sr_no ~ ... ~ 350:2500

s <- apply_spectra(australia, continuum_removal)
plot(s)

s <- apply_spectra(australia, continuum_removal, upper = FALSE)
plot(s)

spectacles

Storing, Manipulating and Analysis Spectroscopy and Associated Data

v0.5-3
GPL-3
Authors
Pierre Roudier [aut, cre], Max Kuhn [ctb], Kristian Hovde Liland [ctb], Bjorn-Helge Mevik [ctb], Hadley Wickham [ctb], Raphael Viscarra Rossel [dtc]
Initial release
2021-01-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.