Skip to contents

Normalization wavelength [\(nm\)] and other normalization metadata of an R object, retrieved from the object's attributes.

Usage

normalization(x)

# Default S3 method
normalization(x)

# S3 method for class 'waveband'
normalization(x)

# S3 method for class 'generic_spct'
normalization(x)

# S3 method for class 'summary_generic_spct'
normalization(x)

# S3 method for class 'generic_mspct'
normalization(x)

Arguments

x

an R object

Value

A single numeric value of wavelength [\(nm\)] or a list with with members.

Details

In the case of wavebands for spectral weighting functions (waveband objects), the normalization wavelength is returned. For spectral objects (generic_spct and derived ), the normalization descriptor, a list object, is returned. This list contains in addition to the normalization wavelength, the multiplier used and type of normalization applied. These metadata makes it possible to "undo" the normalization and to "update" the normalization after a transformation, such as conversion to a related physical quantity, of the spectral data.

Methods (by class)

  • normalization(default): Default methods.

  • normalization(waveband): Normalization of a waveband object.

  • normalization(generic_spct): Normalization of a generic_spct object.

  • normalization(summary_generic_spct): Normalization of a summary.generic_spct object.

  • normalization(generic_mspct): Normalization of a generic_mspct object.

Note

Older versions of the package stored only a subset of the metadata or only a flag to indicate that normalization had been applied. For such objects some or even all fields in the returned list are set to NA.

See also

Other waveband attributes: is_effective(), labels()

Examples


is_normalized(sun.spct)
#> [1] FALSE
normalization(sun.spct)
#> $norm.type
#> [1] NA
#> 
#> $norm.wl
#> [1] NA
#> 
#> $norm.factors
#> [1] NA
#> 
#> $norm.cols
#> [1] NA
#> 
#> $norm.range
#> [1] NA NA
#> 
sun_norm.spct <- normalize(sun.spct)
is_normalized(sun_norm.spct)
#> [1] TRUE
normalization(sun_norm.spct)
#> $norm.type
#> [1] "max" "max"
#> 
#> $norm.wl
#> [1] 451 531
#> 
#> $norm.factors
#> [1] 1.218823e+00 2.962997e+05
#> 
#> $norm.cols
#> [1] "s.e.irrad" "s.q.irrad"
#> 
#> $norm.range
#> [1] 280 800
#> 

my_wband <- waveband(c(400,700))
is_normalized(my_wband)
#> [1] FALSE
normalization(my_wband)
#> [1] NA