Learn R Programming

hsdar (version 0.5.1)

define.features: Definition of absorption features

Description

Function sets the spectral range of absorption features.

Usage

define.features(x, tol = 1.0e-7, FWL = NULL)

Arguments

x
Object of class Speclib containing the band depth or ratio transformed reflectance spectra.
tol
The tolerance of the band depth which defines a wavelength as a start or end point of a feature. Usually a band depth of 0 or a ratio of 1 indicates feature limits, however, better results are achieved if slightly deviating values are tolerated.
FWL
Optional. If passed, result is directly converted into Specfeat. A vector containing one wavelength per feature to be isolated, e.g. the major absorption features. Features which include these specified wavelengths will be isolated.

Value

The updated Speclib containing additional information about the feature limits. If FWL is not NULL, result will be of class Specfeat.

Details

Absorption features are defined as the area between local maxima in the reflectance spectra. This function adds the information of the feature limits to the Speclib. Thus, it is a pre-processing step to isolate features.

See Also

transformSpeclib, specfeat, Specfeat

Examples

Run this code

data(spectral_data)

##Example to define feature limits
bd <- transformSpeclib(subset(spectral_data, season == "summer"), 
                       method = "sh", out = "bd")

## Define features
features <- define.features(bd)

Run the code above in your browser using DataLab