View source: R/water_RSfunctions.R
| calcRadiance | R Documentation |
Converts digital numbers to at-sensor spectral radiance using the RADIANCE_MULT_BAND_x and RADIANCE_ADD_BAND_x values of the MTL file.
calcRadiance(image.DN, sat = "auto", MTL)
image.DN |
raw image in digital numbers, e.g. from loadImage(). Bands B, G, R, NIR, SWIR1, SWIR2, Thermal1 and Thermal2 (L8/L9) are used. Layers are selected by name; a stack without the standard names is used by position, with a warning, and a stack with these names that lacks a needed layer is an error. |
sat |
"L7", "L8", "L9" or "auto" to detect it from the MTL file (MTL is then required) |
MTL |
path to the Landsat metadata (*_MTL.txt) file. Required |
SpatRaster with at-sensor spectral radiance (W m-2 sr-1 um-1) in layers B, G, R, NIR, SWIR1, SWIR2, Thermal1 and, for Landsat 8/9, Thermal2.
Guillermo Federico Olmedo
María Victoria Munafó
R. G. Allen, M. Tasumi, and R. Trezza, "Satellite-based energy balance for mapping evapotranspiration with internalized calibration (METRIC) - Model" Journal of Irrigation and Drainage Engineering, vol. 133, p. 380, 2007
LPSO. (2004). Landsat 7 science data users handbook, Landsat Project Science Office, NASA Goddard Space Flight Center, Greenbelt, Md., (http://landsathandbook.gsfc.nasa.gov/) (Feb. 5, 2007)
U.S. Geological Survey (2019). Landsat 8 (L8) Data Users Handbook, LSDS-1574. EROS, Sioux Falls, South Dakota. https://www.usgs.gov/landsat-missions/landsat-8-data-users-handbook
Other remote sensing support functions:
calcSR(),
calcTOAr(),
cfmask(),
loadImage(),
loadImageSR()
# a small window of the Landsat 7 example scene, to run quickly
MTL <- system.file("extdata", "L7.MTL.txt", package = "water")
WeatherStation <- read.WSdata(WSdata = system.file("extdata", "apples.csv", package = "water"),
date.format = "%d/%m/%Y", lat = -35.42222, long = -71.38639, elev = 201, height = 2.2,
cf = c(1, 0.2777778, 1), tz = "America/Santiago", MTL = MTL)
image.DN <- terra::rast(L7_Talca)[1:60, 1:80, drop = FALSE]
DEM <- terra::rast(DEM_Talca)[1:60, 1:80, drop = FALSE]
calcRadiance(image.DN, sat = "L7", MTL = MTL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.