sr | R Documentation |
Calculate simple ratio index (sr) for a single given band combination or for all possible band combinations. Calculating sr is a frequently used method to standardize reflectance values and to find relationships between properties of the objects and their spectral data.
sr(x, b1, b2, recursive = FALSE, bywavelength = TRUE)
x |
List of class |
b1 |
Band 1 given as band number or wavelength. |
b2 |
Band 2 given as band number or wavelength. |
recursive |
If TRUE indices for all possible band combinations are calculated. If FALSE, only a single sr for the given bands in |
bywavelength |
Flag to determine if b1 and b2 are band number (bywavelength = FALSE) or wavelength (bywavelength = TRUE) values. |
Function performs the following calculation:
nri_{B1,~B2}=\frac{R_{B1}}{R_{B2}};
with R being reflectance values at wavelength B1 and B2, respectively.
If recursive = TRUE, all possible band combinations are calculated.
If recursive = FALSE, a data frame with index values is returned. Otherwise result is an object of class Nri
. See glm.nri
for applying a generalised linear model to an array of simple ratio indices.
Lukas Lehnert
nri
, glm.nri
, glm
, Speclib
, Nri
data(spectral_data) ## Calculate SR of Jordan (1969) (R_{800}/R_{680}) sr_600_680 <- sr(spectral_data, b1=800, b2=680) ## Calculate all possible combinations for WorldView-2-8 spec_WV <- spectralResampling(spectral_data, "WorldView2-8", response_function = FALSE) sr_WV <- sr(spec_WV, recursive = TRUE) sr_WV
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.