conform_spec: Conform spectra to a standard wavenumber series

View source: R/conform_spec.R

conform_specR Documentation

Conform spectra to a standard wavenumber series

Description

Spectra can be conformed to a standard suite of wavenumbers to be compared with a reference library or to be merged to other spectra.

Usage

conform_spec(x, ...)

## Default S3 method:
conform_spec(x, ...)

## S3 method for class 'OpenSpecy'
conform_spec(x, range = NULL, res = 5, allow_na = F, type = "interp", ...)

Arguments

x

a list object of class OpenSpecy.

range

a vector of new wavenumber values, can be just supplied as a min and max value.

res

spectral resolution adjusted to or NULL if the raw range should be used.

allow_na

logical; should NA values in places beyond the wavenumbers of the dataset be allowed?

type

the type of wavenumber adjustment to make. "interp" results in linear interpolation while "roll" conducts a nearest rolling join of the wavenumbers. "mean_up" only works when Spectra are being aggregated, we take the mean of the intensities within the wavenumber specified. This can maintain smaller peaks and make spectra more similar to it's less resolved relatives. mean_up option is still experimental.

...

further arguments passed to approx()

Value

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

Author(s)

Win Cowger, Zacharias Steinmetz

See Also

restrict_range() and flatten_range() for adjusting wavenumber ranges; subtr_baseline() for spectral background correction

Examples

data("raman_hdpe")
conform_spec(raman_hdpe, c(1000, 2000))


OpenSpecy documentation built on Sept. 14, 2024, 9:07 a.m.