KPG1_GTOBJ

Gets an AST Object using an environment parameter

Description:

Gets an AST Object from an NDF, FITS file, HDS path or text file using an environment parameter.

First, attempt to interpret the parameter value as an HDS path. The HDS object must have a type of WCS, must be scalar, and must contain a single one-dimensional array component with name DATA and type _CHAR. This is the scheme used for HDS structures created by KPG1_WWRT.

If the above attempt fails, attempt to interpret the parameter value as an NDF name. If the NDF is opened succesfully, its WCS FrameSet is returned. If a FrameSet is required, its current Frame is returned if a Frame is required. Its base- >current Mapping is returned if a Mapping is required. A Box covering the pixel grid and re-mapped into the current WCS Frame is returned if a Regin is required.

If the above attempt fails, and the parameter value ends with " .FIT" , attempt to interpret the parameter value as the name of a FITS file. Open the FITS file and attempt to obtained an AST FrameSet from the primary HDU headers.

If the above attempt fails, attempt to interpret the parameter value as the name of a text file containing either an AST object dump, or a set of FITS headers.

Invocation

CALL KPG1_GTOBJ( PARAM, CLASS, ISA, IAST, STATUS )

Arguments

PARAM = CHARACTER ( ) (Given)
The parameter name.
CLASS = CHARACTER ( ) (Given)
The required class. Used in error reports (see ISA). If Objects of more than 1 class can be used, this should be supplied blank, and the calling routine should verify that the Object is usable.
ISA = EXTERNAL (Given)
A suitable AST " ISA.." function which returns .TRUE. if an Object is of a suitable class. This is ignored if CLASS is blank. Otherwise, an error is reported if th supplied Object is not of the required class.
IAST = INTEGER (Returned)
The AST Object, or AST__NULL.
STATUS = INTEGER (Given and Returned)
The global status.

Notes: