View source: R/spectralInterpolation.R
spectralInterpolation | R Documentation |
Interpolate spectra to user defined bands. Currently, only a linear interpolation is supported
spectralInterpolation(x, sensor)
x |
Object of class |
sensor |
|
The characteristics must be passed as a data.frame
with two columns: first column with lower bounds of channels and second column with upper bounds. Alternatively, the data.frame
may encompass band centre wavelength and full-width-half-maximum values of the sensor. Function will check the kind of data passed by partially matching the names of the data frame: If any column is named "fwhm"
or "center"
, it is assumed that data are band centre and full-width-half-maximum values.
Object of class Speclib
containing the updated version of x.
Lukas Lehnert
spectralResampling
## Load example data data(spectral_data) ## Create sensor featuring 10 times higher spectral resolution bounds <- seq(min(wavelength(spectral_data)), max(wavelength(spectral_data)), length.out = nbands(spectral_data)*10) sensor <- data.frame(lb = bounds[-1*100 + 1], ub = bounds[-1]) ## Interpolate first spectrum inter <- spectralInterpolation(spectral_data[1,], sensor = sensor)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.