restore_normalization: Restore normalization

View source: R/spct.normalize.r

restore_normalizationR Documentation

Restore normalization

Description

After altering the columns present in a spectrum restore normalization with the previously used criteria.

Usage

restore_normalization(x, old.normalization.ls)

Arguments

x

generic_spct One or more spectra stored in long form, with no normalization applied.

old.normalization.ls

list A list describing the normalization criteria in the format returned by getNormalization().

Details

The normalization criteria are extracted from old.normalization.ls and applied. In the case of spectra in long form, the normalization can be stored as a named list with values for each spectrum as members.

If x contains multiple spectra in long form, the same normalization criterion is applied to all of them based on old.normalization.ls. If getNormalization() is a named list and stored values of norm.type are equal, it is used. If norm.type == "wavelength", norm.wl is used if consistent. norm.range is used as is if consistent, and otherwise expanded to the joint range. If metadata are no consistent across multiple spectra stored in long form re-normalization is skipped with a warning.


photobiology documentation built on March 15, 2026, 9:06 a.m.