KPG1_CHAXx

Checks for usable AXIS structures

Description:

This routine looks for monotonic AXIS structures within the specified axes of the supplied NDF. If all axes have such AXIS structures, then a flag (DATAVL) is returned .TRUE.. If any axis is non-monotonic, a warning message is issued, DATAVL is returned .FALSE., and a scale of 1.0 and offset of 0.0 are returned.

Each axis is then checked for linearity. If the axis is linear, then the corresponding scale and offset of the linear mapping from pixel to data co-ordinates are returned. Otherwise a warning message is issued and the returned scale and offset refer to a linear approximation to the axis co-ordinate system.

Invocation

CALL KPG1_CHAXx( INDF, NDIM, DIM, DATAVL, SCALE, OFFSET, STATUS )

Arguments

INDF = INTEGER (Given)
An identifier for the NDF.
NDIM = INTEGER (Given)
The number of axes.
DIM( NDIM ) = INTEGER (Given)
The indices of the axes to be checked, in increasing order.
DATAVL = LOGICAL (Returned)
Returned .TRUE. if the NDF contains monotonic AXIS structures for all requested axes. Returned .FALSE. otherwise.
SCALE( NDIM ) = ? (Returned)
The scale factors in the linear relationships between axis co-ordinates and pixel co-ordinates. Returned equal to 1.0 if DATVAL is returned .FALSE..
OFFSET( NDIM ) = ? (Returned)
The offsets in the linear relationships between axis co-ordinates and pixel co-ordinates. Returned equal to 0.0 if DATVAL is returned .FALSE..
STATUS = INTEGER (Given and Returned)
The global status.

Notes:

DATA = SCALE( I ) PIXEL + OFFSET( I )

where PIXEL is a pixel co-ordinate for the I th dimension listed in array DIM (i.e. dimension DIM( I ) ), and DATA is the corresponding axis co-ordinate.