Learn R Programming

photobiology (version 0.9.16)

normalize: Normalize spectral data

Description

These functions return a spectral object of the same class as the one supplied as argument but with the spectral data normalized to 1.o a certain wavelength.

Usage

normalize(x, ...)

# S3 method for default normalize(x, ...)

# S3 method for source_spct normalize(x, ..., range = NULL, norm = "max", unit.out = getOption("photobiology.radiation.unit", default = "energy"))

# S3 method for response_spct normalize(x, ..., range = NULL, norm = "max", unit.out = getOption("photobiology.radiation.unit", default = "energy"))

# S3 method for filter_spct normalize(x, ..., range = NULL, norm = "max", qty.out = getOption("photobiology.filter.qty", default = "transmittance"))

# S3 method for reflector_spct normalize(x, ..., range = NULL, norm = "max", qty.out = NULL)

# S3 method for raw_spct normalize(x, ..., range = NULL, norm = "max")

# S3 method for cps_spct normalize(x, ..., range = NULL, norm = "max")

# S3 method for generic_spct normalize(x, ..., range = NULL, norm = "max", col.names)

# S3 method for source_mspct normalize(x, ..., range = NULL, norm = "max", unit.out = getOption("photobiology.radiation.unit", default = "energy"))

# S3 method for response_mspct normalize(x, ..., range = NULL, norm = "max", unit.out = getOption("photobiology.radiation.unit", default = "energy"))

# S3 method for filter_mspct normalize(x, ..., range = NULL, norm = "max", qty.out = getOption("photobiology.filter.qty", default = "transmittance"))

# S3 method for reflector_mspct normalize(x, ..., range = x, norm = "max", qty.out = NULL)

# S3 method for raw_mspct normalize(x, ..., range = x, norm = "max")

# S3 method for cps_mspct normalize(x, ..., range = x, norm = "max")

Arguments

x

An R object

...

not used in current version

range

An R object on which range() returns a numeric vector of length 2 with the limits of a range of wavelengths in nm, with min annd max wavelengths (nm)

norm

numeric Normalization wavelength (nm) or character string "max", or "min" for normalization at the corresponding wavelngth, or "integral" or "mean" for rescaling by dividing by these values.

unit.out

character Allowed values "energy", and "photon", or its alias "quantum"

qty.out

character string Allowed values are "transmittance", and "absorbance" indicating on which quantity to apply the normalization.

col.names

character vector containing the names of columns or variables to which to apply the normalization.

Value

A new object of the same class as x.

Methods (by class)

  • default: Default for generic function

  • source_spct: Normalize a source_spct object.

  • response_spct: Normalize a response spectrum.

  • filter_spct: Normalize a filter spectrum.

  • reflector_spct: Normalize a reflector spectrum.

  • raw_spct: Normalize a raw spectrum.

  • cps_spct: Normalize a cps spectrum.

  • generic_spct: Normalize a raw spectrum.

  • source_mspct: Normalize the members of a source_mspct object.

  • response_mspct: Normalize the members of a response_mspct object.

  • filter_mspct: Normalize the members of a filter_mspct object.

  • reflector_mspct: Normalize the members of a reflector_mspct object.

  • raw_mspct: Normalize the members of a raw_mspct object.

  • cps_mspct: Normalize the members of a cps_mspct object.

See Also

Other rescaling functions: fscale, fshift, getNormalized, is_normalized, is_scaled, setNormalized, setScaled