powered by
For example interpolate spectral irradiance (or spectral transmittance) values at new wavelengths values.
interpolate_spectrum(w.length.in, s.irrad, w.length.out, fill = NA)
numeric array of wavelengths (nm)
a numeric array of spectral values
a value to be assigned to out of range wavelengths
a numeric array of interpolated spectral values
my.w.length <- 300:700 my.s.e.irrad <- with(sun.data, interpolate_spectrum(w.length, s.e.irrad, my.w.length)) plot(my.s.e.irrad ~ my.w.length) lines(s.e.irrad ~ w.length, data=sun.data)
Run the code above in your browser using DataLab