specfeat: Function to isolate absorption features

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/continuum_features.R

Description

Function isolates absorption features from band depth or ratio transformed reflectance spectra.

Usage

1
specfeat(x, FWL, tol = 1.0e-7)

Arguments

x

Object of class Speclib containing the band depth or ratio transformed reflectance spectra.

FWL

A vector containing one wavelength included in each feature to be isolated, e.g. the major absorption features. Features which include these specified wavelengths will be isolated.

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.

Details

A feature is defined as the part of the spectrum between two fix points in the transformed spectra (band depth values of 0). This function separates features at wavelengths of interest according to this rule. Hence it allows a subsequent characterization of the features of interest, e.g. via feature_properties or visual inspection via plot.Specfeat. 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.

Value

An object of class Specfeat containing the isolated features.

Author(s)

Hanna Meyer and Lukas Lehnert

See Also

transformSpeclib, cut_specfeat, Specfeat, plot.Specfeat, feature_properties

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(spectral_data)

## Transform speclib
bd <- transformSpeclib(spectral_data, method = "sh", out = "bd")

##Example to isolate the features around 450nm, 700nm, 1200nm and 1500nm.
featureSelection <- specfeat(bd, c(450,700,1200,1500))

## Plot features
plot(featureSelection, fnumber = 1:4)

## Advanced plotting example
plot(featureSelection, fnumber = 1:4, stylebysubset = "season")

plot(featureSelection, fnumber = 1:4, stylebysubset = "season", 
     changecol = FALSE, changetype = TRUE)

hsdar documentation built on June 21, 2018, 9 a.m.