Learn R Programming

photobiology (version 0.9.4)

insert_hinges: Insert wavelength values into spectral data.

Description

Inserting wavelengths values immediately bafore and after a discontinuity in the SWF, gretaly 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.

Arguments

x
numeric array
y
numeric array
hinges
a numeric array giving the wavelengths at which the s.irrad should be inserted by interpolation, no interpolation is indicated by an empty array (numeric(0))

Value

  • a data.frame with variables w.length and s.irrad

Examples

Run this code
with(sun.data,
    insert_hinges(w.length, s.e.irrad,
       c(399.99,400.00,699.99,700.00)))
with(sun.data,
    insert_hinges(w.length, s.e.irrad,
      c(199.99,200.00,399.50,399.99,400.00,699.99,700.00,799.99,1000.00)))

Run the code above in your browser using DataLab