Learn R Programming

satellite (version 0.2.0)

convDN2RU: Convert a band's scaled counts to radiance, reflectance and/or temperature

Description

Convert a band's scaled counts to radiance, reflectance and/or brightness temperature using a simple linear conversion without any kind of atmospheric correction etc.

Usage

# S4 method for Satellite
convDN2RU(x, convert = "all",
  szen_correction = "TRUE")

# S4 method for RasterStack convDN2RU(x, mult, add, szen, k1, k2)

# S4 method for RasterLayer convDN2RU(x, mult, add, szen, k1, k2)

Arguments

x

An object of class Satellite, raster::RasterStack or raster::RasterLayer.

convert

Type of physical output; one of "rad", "ref", "bt" or "all".

szen_correction

Logical; if TRUE, sun zenith correction is being applied.

mult

Multiplicative coefficient for value transformation (i.e. slope).

add

Additive coefficient for value transformation (i.e. offset).

szen

Cosine of solar zenith angle.

k1,k2

Temperature correction parameters.

Value

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).

Details

The conversion functions are taken from USGS' Landsat 8 manual which is available online at http://landsat.usgs.gov/Landsat8_Using_Product.php.

See Also

calcAtmosCorr for conversions of scaled counts to physical units including a scene-based atmospheric correction.

Examples

Run this code
# NOT RUN {
path <- system.file("extdata", package = "satellite")
files <- list.files(path, pattern = glob2rx("LC8*.tif"), full.names = TRUE)
sat <- satellite(files)
sat <- convDN2RU(sat)

# If you use a raster layer, supply required meta information
bcde <- "B002n"
convDN2RU(x = getSatDataLayer(sat, bcde),
          mult = getSatRADM(sat, bcde),
          add = getSatRADA(sat, bcde))
# }

Run the code above in your browser using DataLab