Learn R Programming

hsdar (version 0.4.1)

feature_properties: Calculation of properties of features

Description

Function to calculate feature properties such as the area, the position of the maximum and several other parameters.

Usage

feature_properties(x)

Arguments

x
Object of class Specfeat

Value

  • An object of class Specfeat containing the properties as (part of the) attribute table.

Details

The function calculates several parameters:
  • area:
{The feature area is calculated by $$area_{F_{i}}=\sum^{max(\lambda)}_{k=min(\lambda)} BD\lambda,$$ with $area_{F_{i}}$ is the area of the feature i, $min(\lambda)$ is the minimum wavelength of the spectrum, $max(\lambda)$ is the maximum wavelength of the spectrum and $BD$ is the band depth. } max:{Wavelength position of the maximum value observed in the feature.} Parameters based on half-max values:{
  • loandup:
{Wavelength position of the lower and upper half-max value.} width:{Difference between wavelength positions of upper and lower half-max values.} gauss_lo:{Similarity of the Gauss distribution function and the feature values between the lower half-max and the maximum position. As similarity measurement, the root mean square error is calculated.} gauss_up:{Same as above but for feature values between the maximum position and the upper half-max.} }

See Also

define.features, specfeat

Examples

Run this code
data(spectral_data)

## Example calculating the areas of the features around 450nm, 
## 700nm, 1200nm and 1500nm.
bd <- transformSpeclib(subset(spectral_data, season == "summer"),
                       method = "sh", out = "bd")

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

## Convert speclib to specfeat giving center wavelength of features
featureSelection <- specfeat(features, c(450,700,1200,1500))

## Calculate properties of features
featureProp <- feature_properties(featureSelection)

Run the code above in your browser using DataLab