View source: R/continuum_features_properties.R
feature_properties | R Documentation |
Function to calculate feature properties such as the area, the position of the maximum and several other parameters. This function can only be used for spectral data transformed using any kind of continuum removal (see transformSpeclib
).
feature_properties(x)
x |
Object of class |
The function calculates several parameters:
area: The feature area is calculated by
area_{F_{i}}=∑^{max(λ)}_{k=min(λ)} BDλ,
with area_{F_{i}} is the area of the feature i, min(λ) is the minimum wavelength of the spectrum, max(λ) 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:
lo and up: 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.
The typical workflow to obtain feature properties is to first calculate the band depth
transformSpeclib
, then isolate the absorption features
specfeat
.
Optionally, cut_specfeat
allows to cut the features at specified wavelengths.
Finally use feature_properties
to retrieve characteristics of the features.
An object of class Specfeat
containing the properties as (part of the) SI table.
Hanna Meyer & Lukas Lehnert
specfeat
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") ## Convert speclib to specfeat giving center wavelength of features featureSelection <- specfeat(bd, c(450,700,1200,1500)) ## Calculate properties of features featureProp <- feature_properties(featureSelection) ## See resulting feature property variables head(SI(featureProp))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.