powered by
Simple Ratio is the ratio of the spectra (mostly reflectance) between two bands in the format of $$SR = \lambda_i/\lambda_j$$
sr(s, b1, b2)lm.sr(s, b1, b2, y)
lm.sr(s, b1, b2, y)
Returns a simple ratio index.
Returns a ggplot object.
Spectral data in the format of visa's Spectra object, spectra.dataframe or spectra.matrix.
A integer number which defines the wavelength of the 1st spectral band.
A integer number which defines the wavelength of the 2nd spectral band.
A numeric variable to correlate with SR
Simple ratio and NDVI looking indices are the two groups of mostly used spectral indices in remote sensing.
library(visa) s <- NSpec.DF$spectra sr1 <- sr(s, 480, 550) s <- NSpec.DF y <- NSpec.DF$N lm.sr(s,600,500,y)
Run the code above in your browser using DataLab