photobiology (version 0.9.25)

reflectance_spct: Calculate reflectance from spectral reflectance

Description

This function returns the mean reflectance for a given waveband and a reflectance spectrum.

Usage

reflectance_spct(spct, w.band, quantity, wb.trim, use.hinges)

Arguments

spct

an object of class generic_spct"

w.band

waveband or list of waveband objects or a numeric vector of length two. The waveband(s) determine the region(s) of the spectrum that are summarized. If a numeric range is supplied a waveband object is constructed on the fly from it.

quantity

character string One of "total", "average" or "mean", "contribution", "contribution.pc", "relative" or "relative.pc"

wb.trim

logical if TRUE wavebands crossing spectral data boundaries are trimmed, if FALSE, they are discarded

use.hinges

logical Flag indicating whether to insert "hinges" into the spectral data before integration so as to reduce interpolation errors at the boundaries of the wavebands.

Value

A single numeric value expressed as a fraction of one