AVHRCOR

AVHRR automated geometric correction


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: References :: Related

Back to top

Description


Registers an uncorrected input AVHRR image to an output (master) image. One ground control point (GCP), an approximate starting scan date and time, and a set of orbital element values are required as input. The input image can be either 2048 or 409 pixels wide (HRPT/LAC or GAC data, respectively). AVHRCOR creates a new output file in either UTM or UPS coordinates; however, AVHRCOR typically involves creating an output file and defining the area of interest and projection (georeferencing) system before it is run.
Back to top

Parameters


avhrcor(fili, filo, dbic, dboc, dbiw, dbow, avhrrseg, pixres, resample, memsize, timemult)

Name Type Caption Length Value range
FILI * str Input file name 1 -    
FILO * str Output file name 1 -    
DBIC * List[int] Input raster channel(s) 1 -    
DBOC List[int] Output raster channel(s) 0 -    
DBIW List[int] Raster input window 0 - 4 Xoffset, Yoffset, Xsize, Ysize
DBOW List[int] Raster output window 0 - 4 Xoffset, Yoffset, Xsize, Ysize
AVHRRSEG List[int] AVHRR calibration/orbit text segment 0 - 1  
PIXRES List[float] Output pixel resolution (m) 0 - 1 Default: 1000.0
RESAMPLE str Resampling Mode 0 - 5 NEAR | BILIN | CUBIC | 8PT | 16PT
Default: NEAR
MEMSIZE List[float] Working memory size (MB) 0 - 1  
TIMEMULT List[int] Multiplier for start scan date interval 0 - 1 1 -
Default: 1

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the input file that contains the uncorrected AVHRR image data and the AVHRRSEG text segment. The input file must be a PCIDSK file (created with FIMPORT or MIAVHRR) or an actual level-1b AVHRR disk file.

FILO

Specifies the name of the output PCIDSK file to receive the corrected image data. The output file must contain a georeferenced segment.

If the specified output file does not already exist, AVHRCOR creates a new output file with extents based on the four corner points of the input image. The new output file is either in Universal Transverse Mercator (UTM) or Universal Polar Stereographic (UPS) coordinates, and uses the WGS 84 datum. UPS is used when the input file contains data near or including a polar region because UTM is typically a suitable projection only for data between latitude 75 degrees north and latitude 75 degrees south.

DBIC

Specifies the image channel(s) to be corrected.

DBOC

Specifies the channels in the output file (FILO) to receive the corrected image data.

For each input channel specified (DBIC), an output channel must be specified. Duplicate channels are not allowed.

If the output file does not exist, this parameter is ignored.

DBIW

Optionally specifies the raster window (Xoffset, Yoffset, Xsize, Ysize) of data to correct. If this parameter is not specified, the entire image is used by default. Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

DBOW

Optionally specifies the raster window (Xoffset, Yoffset, Xsize, Ysize) to which the output is registered. If this parameter is not specified, the output window is the entire output image. Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

If the output file (FILO) does not already exist, this parameter is ignored.

AVHRRSEG

Specifies the input text segment that contains AVHRR calibration and orbital data. This segment is automatically created when FIMPORT or MIAVHRR reads in an AVHRR image (from disk or tape, respectively).

If this parameter is not specified, AVHRCOR tries to use any valid AVHRR text segment in the input file.

PIXRES

This parameter applies only when a new output file is created; it allows you to specify a pixel resolution or size (in meters) for the output file. By default, the pixel size is set to 1,000 m (for example, 1000 x 1000 meters). The pixel size determines the number of pixels and lines in the output file. Decreasing the pixel size results in a larger output file and increased computation time.

RESAMPLE

Specifies the resampling method to use during the correction process.

Supported methods are:

MEMSIZE

Specifies the size, in megabytes, of the AVHRCOR internal working memory.

Only a portion of the input image must be held in RAM at any particular time during processing. The size of the portion that must be in memory depends on the size of the input image and on the amount of rotation between the input image and the geocoded output image.

TIMEMULT

Specifies a multiplication factor that indicates the time interval in which AVHRCOR searches for the exact starting scan date of the input image. The default value is 1, which indicates a default search interval of 60 minutes.

Back to top

Details

AVHRCOR uses the NORAD Simplified General Perturbations (SGP) satellite orbital model to perform a geometric correction using the following steps:

Step 1: Use the satellite name to locate the corresponding Two Line Element (TLE) file in either the current working directory or $PCIHOME/etc. For example, the TLE file for the NOAA-12 satellite is named noaa-12.2le. A TLE file contains orbital element values for a satellite at various epochs (dates).

Step 2: Locate the epoch in the TLE file that is closest to the approximate starting scan date. Extract the corresponding orbital element values. These orbital element values are used in satellite position and velocity prediction models. For best results, ensure that the TLE files are kept up-to-date. Ideally, the epoch date would not differ from the starting scan date by more than a few days.

Step 3: Given one GCP and an approximate starting scan date, use the satellite orbital model to compute the exact starting scan date. This process is referred to as image date refinement. The GCP is used only to refine the image date. After image date refinement is performed, the mapping between pixel-line coordinates and geographic coordinates may still not precisely match the GCP. As a result, a pixel-line shift is applied to ensure that the GCP is matched precisely. Image-date refinement is performed only if a single GCP is available in the input file text segment.

In some situations, image date refinement may fail; if this occurs, the geometric correction cannot proceed. The following are possible reasons for image date refinement failure:

Step 4: When you find the starting scan date, the transformations between the input image coordinates and the output image georeferencing system are fully determined. Every pixel in the output image is created by resampling the input image using these transformations.

Resampling

Resampling is the process of sampling one or more input pixels to create one output pixel (this is distinct from the transform phase, which simply determines where the output pixel lies on the input image). In general, resampling is accomplished by taking a weighted average of a small window of input pixels around a point determined by the transform phase. The quality of the corrected output image and the time required for calculation is highly dependent on the chosen resampling method.

AVHRCOR offers four of the more popular resampling methods:
Note: The Cubic Convolution and Sin(x)/x methods can overshoot or undershoot the input pixel values, thus extending the range of values in the image.

TLE data file

AVHRCOR requires NORAD Two-Line Element (TLE) data files to operate properly. A TLE file is a text file that contains information about specific satellite orbital parameters. Each pair of lines in a TLE file describes a satellite's orbital position in space on a specific date. The etc folder contains TLE files for various NOAA satellites; there is one TLE file for each satellite. A TLE file has a .2le file name extension.

If you are working with recent AVHRR data, you may need to obtain more up-to-date TLE files; these are publicly available and may be acquired through the Internet. When you download a TLE file, be sure to rename it properly (for example, noaa-12.2le) and save it to the current working folder. Files obtained from various Internet sites can be edited; for example, some of the files contain TLE entries for more than one satellite and distinguish between satellites by preceding each TLE entry with the satellite name. To construct a proper TLE file that AVHRCOR can use, extract the relevant TLE entries from the file but omit the satellite name portion. TLE files saved to the current working directory override any in the $PCIHOME/etc directory.

For best results with AVHRCOR, ensure that the TLE file contains an entry with an epoch date that is close to the scan date of the geometrically corrected AVHRR image.

Text segment format

AVHRCOR looks only for text with the following format; the rest of the information is ignored.

SATID:	NOAA-12
YEAR:	1994
DAY:	203.599031
GCP:	LONG = -96.117188        LAT = 49.062500
GCP:	X = 1024.5               Y = 0.5
GCP:	D = 0 
TLELINE:	... TLE Line 1 ... 
TLELINE:	... TLE Line 2 ...

With the exception of the TLE lines, the spacing of the blanks is inconsequential. If any of the required information is missing from the text segment, AVHRCOR cannot perform the geometric correction.

Using a standard text editor, you may create your own text segment for AVHRCOR using this format. Use TEXREAD to read the text file into a text segment.

Details of the text segment format are:

Datum codes

The following shows some examples of valid datum code numbers:

D = -1     NAD27 (USA, NADCON)
D = -2     NAD83 (USA, NADCON)
D = -3     NAD27 (Canada, NTv1)
D = -4     NAD83 (Canada, NTv1)
D = 800    Normal Sphere
D = 0      WGS 1984
D = 1      WGS 1972

For a complete list of datum codes, refer to 'Projections and earth models' in the Technical Reference section of the CATALYST Professional Online Help.

Definitions

The following terms are used throughout documentation pertaining to AVHRCOR:
Back to top

Example

Correct a three-channel input database by using Nearest-Neighbor resampling and generate the results to a three-channel file. The AVHRR calibration and orbital data is stored in segment 2.

from pci.avhrcor import avhrcor

fili	=	"NOAA-14.PIX"
filo	=	"NOAA-14C.PIX"
dbic	=	[1,2,3]
dboc	=	[1,2,3]
dbiw	=	[]
dbow	=	[]
avhrrseg	=	[2]
pixres	=	[4000]
resample	=	"NEAR"
memsize	=	[]
timemult	=	[]

avhrcor( fili, filo, dbic, dboc, dbiw, dbow, avhrrseg, 
pixres, resample, memsize, timemult )
Back to top

References

NOAA Technical Memorandum, 1979 (revised 1988), "Data Extraction and Calibration of Tiros-N/NOAA Radiometers", ed. Walter G. Planet, (NESS 107 - Rev. 1, U.S. Department of Commerce., Appendix C).

Hoots, Felix R. and Ronald L. Roehrich, "Models for Propagation of NORAD Element Sets", Spacetrack Report No. 3, December 1980.

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.