absindex {albatross} | R Documentation |
Functions of absorbance data
Description
Calculate absorption coefficients and/or absorbance data at given wavelengths, spectral slopes, and their ratios.
Usage
absindex(
x, abs.path, unit = c("log10", "m^-1"), out.A = 254,
out.a = c(350, 355, 374, 443),
out.a.ratio = list(c(250, 365), c(465, 665)),
out.slope = list(c(275, 295), c(350, 400)),
out.slope.ratio = list(c(275, 295, 350, 400)),
out.slope.nrmse = FALSE
)
Arguments
x |
Absorption data, either a |
abs.path |
A numeric vector of optical path lengths for every spectrum, in
centimetres. Defaults to |
unit |
Specifies whether |
out.A |
Return absorbance values at the wavelengths given as a numeric vector. |
out.a |
Return absorption coefficients at the wavelengths given as a numeric vector. |
out.a.ratio |
Return ratios of absorption coefficients at the wavelengths given as
a list of two-element numeric vectors. For every pair of
wavelengths, |
out.slope |
Return spectral slopes at wavelength ranges given as a list of
two-element numeric vectors. See the |
out.slope.ratio |
Return ratios of spectral slopes for pairs of wavelength ranges
given as a list of four-element numeric vectors. For every list
element, the value returned is |
out.slope.nrmse |
When computing slopes, also return the root-mean-square error for
the models providing them, divided by the range of the response:
|
Details
Currently, the spectral slopes are calculated by fitting a linear
model
\ln \alpha = b_0 - b_1 \lambda
and returning b_1
as the slope. See
(Twardowski, Boss, Sullivan, and Donaghay 2004) for a discussion of the calculation methods for
spectral slopes.
Requested wavelengths missing from the original grid are interpolated
using spline
. NA
values are returned
outside the original wavelength range.
Value
A data.frame
with one row per sample, containing
the following columns:
sample |
Names or numbers of the samples. |
A.<wavelength> |
Absorbance values, for every wavelength in |
a.<wavelength> |
Absorption coefficients, for every wavelength in |
aR.<wl[1]>.<wl[2]> |
Ratios of absorption coefficients, for every wl in
|
S.<wl[1]>.<wl[2]> |
Spectral slopes, for every wl in |
NRMSE.S.<wl[1]>.<wl[2]> |
If |
SR.<wl[1]>.<wl[2]>.<wl[3]>.<wl[4]> |
Ratios of spectral slopes, for every wl in
|
References
Twardowski MS, Boss E, Sullivan JM, Donaghay PL (2004). “Modeling the spectral shape of absorption by chromophoric dissolved organic matter.” Marine Chemistry, 89(1), 69-88. doi:10.1016/j.marchem.2004.02.008.
See Also
Examples
data(feems)
absindex(absorp)