ir_normalize {ir}R Documentation

Normalizes infrared spectra in an ir object

Description

ir_normalize normalizes the intensity values of infrared spectra. Spectra can be normalized in three ways (value for argument method):

"zeroone"

Normalization so that the intensity values range in [0;1]. Note that for different spectra, for different wavenumber values the intensity may be 1 after normalization, depending on the location of the peak with the maximum height.

"area"

Normalization so that the intensity values of each spectrum sum to 1. Note that in the case of negative intensities values, these will be count as negative values during summation.

A numeric value

Normalization so that the intensity at a specified wavenumber value has value 1 and the minimum intensity value is 0.

Usage

ir_normalize(x, method = "area")

ir_normalise(x, method = "area")

Arguments

x

An object of class ir.

method

A character value specifying which normalization method to apply. If method = "zeroone", all intensity values will be normalized to [0;1]. If method = "area", all intensity values will be divided by the sum of the intensity values at all wavenumber values of the spectrum. If method is convertible to a numeric value, e.g. method = "980", the intensity of all spectra at a wavenumber value of 980 will be set to 1 and the minimum intensity value of each spectrum will be set to 0, i.e. the spectra will be normalized referring to a specific wavenumber value.

Value

An object of class ir representing a normalized version of x.

Examples

# with method = "area"
x <-
   ir::ir_sample_data %>%
   ir::ir_normalize(method = "area")

# normalizing to a specific peak
x <-
   ir::ir_sample_data %>%
   ir::ir_normalize(method = 1090)


[Package ir version 0.2.1 Index]