Learn R Programming

photobiology (version 0.11.3)

normalized_diff_ind: Calculate a normalized difference.

Description

This method returns a normalized difference index value for an arbitrary pair of wavebands. There are many such indexes in use, such as NDVI (normalized difference vegetation index), NDWI (normalized difference water index), NDMI (normalized difference moisture index), etc., the only difference among then is in the wavebands used.

Usage

normalized_diff_ind(spct, w.band.plus, w.band.minus, f, ...)

normalised_diff_ind(spct, w.band.plus, w.band.minus, f, ...)

NDxI(spct, w.band.plus, w.band.minus, f, ...)

# S3 method for default normalized_diff_ind(spct, w.band.plus, w.band.minus, f, ...)

# S3 method for generic_spct normalized_diff_ind(spct, w.band.plus, w.band.minus, f, ...)

# S3 method for generic_mspct normalized_diff_ind(spct, w.band.plus, w.band.minus, f, ...)

Value

A named numeric value for the index, or a tibble depending on whether a spectrum or a collection of spectra is passed as first argument. If the wavelength range of spct does not fully overlap with both wavebands NA is silently returned.

Arguments

spct

an R object

w.band.plus, w.band.minus

waveband objects The wavebands determine the regions of the spectrum used in the calculations.

f

function used for integration taking spct as first argument and a list of wavebands as second argument.

...

additional arguments passed to f

Methods (by class)

  • normalized_diff_ind(default): default

  • normalized_diff_ind(generic_spct):

  • normalized_diff_ind(generic_mspct):

Details

f is most frequently reflectance, but also transmittance, or even absorbance, response, irradiance or a user-defined function can be used if there is a good reason for it. In every case spct should be of the class expected by f. When using two wavebands of different widths do consider passing to f a suitable quantity argument, for example to compare averages rather than integrals. Wavebands can describe weighting functions if desired.

$$\mathrm{NDxI} = \frac{f(s, wb_\mathrm{plus}) - f(s, wb_\mathrm{minus})}{f(s, wb_\mathrm{plus}) + f(s, wb_\mathrm{minus})}$$

See Also

Rfr_normdiff