spectralResampling: Spectral resampling

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/spectral_resampling.R

Description

Resample spectra to (satellite) sensors

Usage

1
2
spectralResampling(x, sensor, rm.NA = TRUE, continuousdata = "auto",
                   response_function = TRUE)

Arguments

x

Object of class Speclib. Data to be spectrally resampled.

sensor

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

rm.NA

If TRUE, channels which are not covered by input data wavelength are removed

continuousdata

Definition if returned Speclib is containing continuous data or not.

response_function

If TRUE, the spectral response function of the sensor is used for integration, if FALSE a Gaussian distribution is assumed and if NA the mean value of spectra[min(ch):max(ch)] is calculated.

Details

The characteristics of (satellite) sensor to integrate spectra can be chosen from a list of already implemented sensors. See get.sensor.characteristics for available sensors.

Otherwise the characteristics can 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.

If sensor characteristics are defined manually, a Gaussian response is always assumed.

Value

Object of class Speclib

Author(s)

Lukas Lehnert

See Also

get.sensor.characteristics, get.gaussian.response

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Load example data  
data(spectral_data)

## Resample to RapidEye
data_RE <- spectralResampling(spectral_data, "RapidEye", 
                              response_function = TRUE)

## Plot resampled spectra
plot(data_RE)

## Compare different methods of spectral resampling
par(mfrow=c(1,3))
ga <- spectralResampling(spectral_data, "RapidEye", 
                         response_function = FALSE)
plot(ga)
re <- spectralResampling(spectral_data, "RapidEye", 
                         response_function = TRUE)
plot(re)
no <- spectralResampling(spectral_data, "RapidEye", 
                         response_function = NA)
plot(no)

hsdar documentation built on Nov. 17, 2017, 4:35 a.m.