mask_sam: Mask SAM

Description Usage Arguments Value Examples

View source: R/mask_sam.r

Description

The spectral angle mapper algorithm always find a match, as it was designed to compare between to spectra. However, somethimes the match is far from good and the user could want to drop the poorly matched pixels. This function will create a mask for such a purpose.

Usage

1
mask_sam(x, threshold = 1.1)

Arguments

x

an array. Tipically, the array at the raw_sam slot of a SAM object.

threshold

cut off value above wich, the SAM relation found is deemed unsignificant

Value

S3 matrix

Examples

1
2
3
4
5
6
set.seed(4356)
x <- array(abs(rnorm(1000)), c(10, 10, 10))
x <- mask_sam(x, 0.1)
# trick to plot as clipper
class(x) <- c("clipper", "matrix")
plot(x, legend = FALSE)

uFTIR documentation built on Oct. 25, 2021, 9:08 a.m.