data_norm: Normalization of spectral data

adj_negR Documentation

Normalization of spectral data

Description

adj_neg() converts numeric values x < 1 into values >= 1, keeping absolute differences between values by shifting intensity values with the value of the smallest number. make_rel() converts values x into relative values between 0 and 1 using the standard normalization equation. If na.rm is TRUE, missing values are removed before the computation proceeds.

Usage

adj_neg(x, na.rm = FALSE)

make_rel(x, na.rm = FALSE)

Arguments

x

a numeric vector or an R object which is coercible to one by as.vector(x, "numeric"); x should be intensity data.

na.rm

logical. Should missing values be removed?

Details

adj_neg() is used in Open Specy to avoid errors that could arise from log transforming spectra when using adj_intens() and other functions. make_rel() is used in Open Specy to retain the relative height proportions between spectra while avoiding the large numbers that can result from some spectral instruments.

Value

adj_neg() and make_rel() return numeric vectors with the normalized data.

Author(s)

Win Cowger, Zacharias Steinmetz

See Also

min() for the calculation of minima; adj_intens() for log transformation functions

Examples

adj_neg(c(-1000, -1, 0, 1, 10))
make_rel(c(-1000, -1, 0, 1, 10))


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