cut.specfeat: Cut absorption features

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

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

1
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

specfeat, Specfeat

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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 documentation built on Aug. 4, 2020, 5:06 p.m.