ENVICalibrateRaster
This function constructs an ENVIRaster from a source raster that has been calibrated to radiance, top-of-atmosphere (TOA) reflectance, or brightness temperatures.
The result is a virtual raster, which has some additional considerations with regard to methods and properties. See Virtual Rasters for more information, including how they differ from ENVITasks.
The equivalent task is RadiometricCalibration.
Example
This example calibrates Landsat 8 multispectral bands to TOA reflectance. Replace the example filename with the path and filename of your own Landsat-8 file.
; Start the application
e = ENVI()
; Open a Landsat 8 scene
file = 'LC80410302013213LGN00_MTL.txt'
raster = e.OpenRaster(file)
; Landsat-8 data are stored in a five-element
; array. Multispectral bands from the OLI sensor
; are stored in the first array element.
OLIBands = raster[0]
; Calibrate to TOA reflectance
reflRaster = ENVICalibrateRaster(OLIBands, $
CALIBRATION='Top-of-Atmosphere Reflectance')
; Display the result
view = e.GetView()
layer = view.CreateLayer(reflRaster)
view.Zoom, /FULL_EXTENT
See More Examples below.
Syntax
ENVIRaster = ENVICalibrateRaster(Input_Raster [, Keywords=value])
Return Value
This routine returns a reference to an ENVIRaster.
Arguments
Input_Raster
Specify an input ENVIRaster. In the case of Landsat or other metaspectral datasets, specify the correct array element corresponding to the band group you are interested in. The code example above shows a Landsat-8 scenario.
Methods
This virtual raster inherits methods and properties from ENVIRaster; however the following methods will override the ENVIRaster methods:
Keywords
CALIBRATION (optional)
Set this keyword to a string indicating the calibration type. The choices are:
Radiance
(default)Top-of-Atmosphere Reflectance
Brightness Temperature
See Radiometric Calibration for the calibration options that are available for different sensors.
DATA_TYPE (optional)
Specify one of the following strings, indicating the output data type:
String |
Data Type |
---|---|
|
Byte (8 bits) |
|
Double-precision floating point (64 bits) |
|
Floating point (32 bits) |
|
Integer (16 bits) |
|
Long integer (32 bits) |
|
Unsigned integer (16 bits) |
|
Unsigned long integer (32 bits) |
ERROR
Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''
). If an error occurs and the routine is a function, then the function result will be undefined.
When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.
See Manage Errors for more information on error handling in ENVI programming.
NAME
Specify a string that identifies the raster.
More Examples
Calibrate a WorldView-3 multispectral dataset to radiance
Replace the example filename with the path and filename of your own WorldView-3 file.
; Start the application
e = ENVI()
; Open a WorldView-3 scene
file = '14OCT14083351-M2AS-054127053010_01_P001.TIL'
raster = e.OpenRaster(file)
; Calibrate to radiance
reflRaster = ENVICalibrateRaster(raster, $
CALIBRATION='Radiance')
; Display the result
view = e.GetView()
layer = view.CreateLayer(reflRaster)
view.Zoom, /FULL_EXTENT
Version History
ENVI 5.3.2 |
Introduced |
ENVI 5.4 |
Added Dehydrate and Hydrate methods; added NAME keyword |
ENVI 5.5 |
Added DATA_TYPE keyword |
API Version
4.2