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

derivative_speclib

Derivation


Description

Calculate derivations of spectra in Speclib.

Usage

derivative.speclib(x, m = 1, method = "sgolay", ...)

Arguments

x

Object of class Speclib.

m

Return the m-th derivative of the spectra.

method

Character string giving the method to be used. Valid options are "finApprox" or "sgolay".

...

Further arguments passed to sgolayfilt.

Details

Two different methods are available:

  • Finite approximation (finApprox):

    \frac{dr}{dλ}=\frac{r(λ_i)-r(λ_{i+1})}{Δλ},

    where r_i is the reflection in band i and Δλ the spectral difference between adjacent bands.

  • Savitzky-Golay derivative computation (sgolay, default method)

Value

Object of class Speclib.

Author(s)

Lukas Lehnert

References

Tsai, F. & Philpot, W. (1998): Derivative analysis of hyperspectral data. Remote Sensing of Environment 66/1. 41-51.

See Also

Examples

data(spectral_data)

## Calculate 1st derivation
d1 <- derivative.speclib(spectral_data)

## Calculate 2nd derivation
d2 <- derivative.speclib(spectral_data, m = 2)

## Calculate 3rd derivation
d3 <- derivative.speclib(spectral_data, m = 3)

par(mfrow=c(2,2))
plot(spectral_data)
plot(d1)
plot(d2)
plot(d3)

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.