adj_intens: Adjust spectral intensities to absorbance units

View source: R/adj_intens.R

adj_intensR Documentation

Adjust spectral intensities to absorbance units

Description

Converts reflectance or transmittance intensity units to absorbance units.

Usage

adj_intens(x, ...)

## S3 method for class 'formula'
adj_intens(formula, data = NULL, ...)

## S3 method for class 'data.frame'
adj_intens(x, ...)

## Default S3 method:
adj_intens(x, y, type = "none", make_rel = TRUE, ...)

Arguments

x

a numeric vector containing the spectral wavenumbers; alternatively a data frame containing spectral data as "wavenumber" and "intensity" can be supplied.

formula

an object of class 'formula' of the form intensity ~ wavenumber.

data

a data frame containing the variables in formula.

y

a numeric vector containing the spectral intensities.

type

a character string specifying whether the input spectrum is in absorbance units ("none", default) or needs additional conversion from "reflectance" or "transmittance" data.

make_rel

logical; if TRUE spectra are automatically normalized with make_rel().

...

further arguments passed to the submethods.

Details

Many of the Open Specy functions will assume that the spectrum is in absorbance units. For example, see match_spec() and subtr_bg(). To run those functions properly, you will need to first convert any spectra from transmittance or reflectance to absorbance using this function. The transmittance adjustment uses the log10(1 / T) calculation which does not correct for system and particle characteristics. The reflectance adjustment uses the Kubelka-Munk equation (1 - R)^2 / 2R. We assume that the reflectance intensity is a percent from 1-100 and first correct the intensity by dividing by 100 so that it fits the form expected by the equation.

Value

adj_intens() returns a data frame containing two columns named "wavenumber" and "intensity".

Author(s)

Win Cowger, Zacharias Steinmetz

See Also

subtr_bg() for spectral background correction; match_spec() matches spectra with the Open Specy or other reference libraries

Examples

data("raman_hdpe")

adj_intens(raman_hdpe)


OpenSpecy documentation built on July 6, 2022, 5:07 p.m.