insert_spct_hinges {photobiology} | R Documentation |
Insert new wavelength values into a spectrum
Description
Insert new wavelength values into a spectrum interpolating the corresponding spectral data values.
Usage
insert_spct_hinges(spct, hinges = NULL, byref = FALSE)
Arguments
spct |
an object of class "generic_spct" |
hinges |
numeric vector of wavelengths (nm) at which the s.irrad should be inserted by interpolation, no interpolation is indicated by an empty vector (numeric(0)) |
byref |
logical indicating if new object will be created by reference or by copy of spct |
Value
a generic_spct or a derived type with variables w.length
and
other numeric variables.
Note
Inserting wavelengths values "hinges" immediately before and after a discontinuity in the SWF, greatly reduces the errors caused by interpolating the weighted irradiance during integration of the effective spectral irradiance. This is specially true when data has a large wavelength step size.
Examples
insert_spct_hinges(sun.spct, c(399.99,400.00,699.99,700.00))
insert_spct_hinges(sun.spct,
c(199.99,200.00,399.50,399.99,400.00,699.99,
700.00,799.99,1000.00))
[Package photobiology version 0.11.2 Index]