Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cut.specfeat

Cut absorption features


Description

Function cuts absorption features to a user-specified range. Since features may differ among spectra, it might be important to cut the features to specific wavelengths ranges.

Usage

cut_specfeat(x, ..., fnumber, limits)

Arguments

x

An object of class Specfeat containing isolated features determined by specfeat.

fnumber

A vector of the positions of the features in x to be cut.

limits

A vector containing the start and end wavelength for each fnumber. The corresponding feature will be cut to this specified range.

...

Further arguments passed to generic functions. Currently ignored.

Details

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 cut features.

Author(s)

Hanna Meyer and Lukas Lehnert

See Also

Examples

data(spectral_data)

##Example to cut the features around 450nm and 700nm to a specific range
## Transform speclib
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))

## Cut 1st and 2nd feature to [310 nm, 560 nm] and [589 nm, 800 nm]
featuresCut <- cut_specfeat(x = featureSelection, fnumber = c(1,2), 
                            limits = c(c(310, 560), c(589, 800)))

## Plot result (1st and 2nd feature)
plot(featuresCut, fnumber = 1:2)

hsdar

Manage, Analyse and Simulate Hyperspectral Data

v1.0.3
GPL
Authors
Lukas W. Lehnert [cre, aut] (<https://orcid.org/0000-0002-5229-2282>), Hanna Meyer [ctb], Joerg Bendix [ctb]
Initial release
2020-08-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.