convSC2Rad | R Documentation |
Convert a band's scaled counts to radiance using a simple linear conversion without any kind of atmospheric correction etc.
## S4 method for signature 'Satellite'
convSC2Rad(x, szen_correction = "TRUE", subset = FALSE)
## S4 method for signature 'RasterStack'
convSC2Rad(x, mult, add, szen)
## S4 method for signature 'RasterLayer'
convSC2Rad(x, mult, add, szen)
x |
An object of class Satellite, raster::RasterStack or raster::RasterLayer providing scaled counts (DNs). |
szen_correction |
Logical; if |
subset |
Logical; if |
mult |
Multiplicative coefficient for value transformation (i.e. slope). |
add |
Additive coefficient for value transformation (i.e. offset). |
szen |
Cosine of solar zenith angle. |
The conversion functions are taken from USGS' Landsat 8 Data Users Handbook which is available online at https://www.usgs.gov/landsat-missions/landsat-8-data-users-handbook.
If x is a Satellite object, a Satellite object with added converted
layers;
if x is a raster::Raster*
object, a raster::Raster*
object with
converted layer(s).
calcAtmosCorr
for conversions of scaled counts
to physical units including a scene-based atmospheric correction.
path <- system.file("extdata", package = "satellite")
files <- list.files(path, pattern = glob2rx("LC08*.TIF"), full.names = TRUE)
sat <- satellite(files)
sat <- convSC2Rad(sat)
# If you use a raster layer, supply required meta information
bcde <- "B002n"
convSC2Rad(x = getSatDataLayer(sat, bcde),
mult = getSatRADM(sat, bcde),
add = getSatRADA(sat, bcde))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.