Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

spectralInterpolation

Interpolate spectra


Description

Interpolate spectra to user defined bands. Currently, only a linear interpolation is supported

Usage

spectralInterpolation(x, sensor)

Arguments

x

Object of class Speclib.

sensor

data.frame containing definition of sensor characteristics. See details section for further information.

Details

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.

Value

Object of class Speclib containing the updated version of x.

Author(s)

Lukas Lehnert

See Also

Examples

## 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)

hsdar

Manage, Analyse and Simulate Hyperspectral Data

v1.0.3
GPL
Authors
Lukas W. Lehnert [cre, aut] (<https://orcid.org/0000-0002-5229-2282>), Hanna Meyer [ctb], Joerg Bendix [ctb]
Initial release
2020-08-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.