This task calculates the gain and offset for QUick Atmospheric Correction (QUAC) on multispectral or hyperspectral imagery.
Note: This function requires a separate license for the ENVI Atmospheric Correction Module; contact your sales representative for more information.
Example
e = ENVI()
File = Filepath('qb_boulder_msi', Subdir=['data'], $
Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
Task = ENVITask('CalculateQUACGainOffset')
Task.INPUT_RASTER = Raster
Task.Execute
Print, 'Bad bands: ',Task.BBL
Print, 'Gains: ',Task.GAIN
Print, 'Offsets: ',Task.OFFSET
Result:
Bad bands: 1 1 1 1
Gains: 0.0012088706 0.00075686112 0.00098287757 0.00099052524
Offsets: -0.18737493 -0.13812715 -0.093373366 -0.053983625
Syntax
Result = ENVITask('CalculateQUACGainOffset')
Input properties (Set, Get): INPUT_RASTER, SENSOR
Output properties (Get only): BBL, GAIN, OFFSET
Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.
Methods
This task inherits the following methods from ENVITask:
AddParameter
Execute
Parameter
ParameterNames
RemoveParameter
Properties
This task inherits the following properties from ENVITask:
COMMUTE_ON_DOWNSAMPLE
COMMUTE_ON_SUBSET
DESCRIPTION
DISPLAY_NAME
NAME
REVISION
TAGS
This task also contains the following properties:
BBL
This is the bad band list, returned as a byte array in the form of [number of bands]. A value of 1 indicates a good band, and 0 indicates a bad band.
GAIN
This parameter contains the data gain values that can be applied to the raster, returned as a double-precision array in the form of [number of bands].
INPUT_RASTER (required)
Specify a raster to calculate the gain and offset for QUick Atmospheric Correction (QUAC).
OFFSET
This parameter contains the data offset values that can be applied to the raster, returned as a double-precision array in the form of [number of bands].
SENSOR (optional)
Specify one of the following strings, indicating the sensor type of the input raster:
Generic / Unknown Sensor
Highly Vegetated Scenes
AISA-ES
ALI
ASAS
AVIRIS
CAP ARCHER
CASI
COMPASS
HYCAS
HYDICE
HyMap
Hyperion
Landsat TM/ETM/OLI
LASH
MARS
MODIS
QuickBird
RGB
WorldView-2
Near Infrared (NIR)
Near-Shortwave Infrared (NIR-SWIR)
- If SENSOR is not set, then the task uses the Generic/Unknown Sensor option to guess the best sensor type, based on the number of input bands and their wavelengths.
- Select the Highly Vegetated Scenes option if the image is highly vegetated.
- Select the Near Infrared (NIR) option if the input raster has more than 70 bands and the wavelengths span the near-infrared region.
- Select the Near-Shortwave Infrared (NIR-SWIR) option if the input raster has more than five bands and the wavelengths span the near-shortwave infrared region.
Version History
API Version
4.3
See Also
ENVITask, ENVIGainOffsetWithThresholdRaster, ENVIQUACRaster, QUAC Task