SCA: Calculate the spectral contrast angle (SCA) between two...

Description Usage Arguments References Examples

View source: R/SCA.R

Description

The SCA measures the angle between two vectors corresponding to closely related spectra to measure whether they are the same or not (Wan *et al.* 2002).

Usage

1
SCA(a, b)

Arguments

a

vector 1

b

vector 2

References

Wan, K. X., Vidavsky, I., & Gross, M. L. (2002). Comparing similar spectra: from similarity index to spectral contrast angle. Journal of the American Society for Mass Spectrometry, 13(1), 85-88.

Examples

1
2
3
4
5
6
7
8
# Load hyperSpec object
data("hs_example")

# Convert to MassSpectrum object
hs.x.proc <- hs_preprocess(hs_example)

# Calc SCA
disst <- SCA(hs.x.proc@data$spc[1,], hs.x.proc@data$spc[2,])

CMET-UGent/MicroRaman documentation built on July 25, 2020, 6:20 p.m.