Once you have read WCS information from a dataset, as in
, you may wish to check that you have been
successful. The following will detect and classify the things that
might possibly go wrong:
IF ( STATUS .NE. 0 ) THEN
<an error occurred (a message will have been issued)>
ELSE IF ( WCSINFO .EQ. AST__NULL ) THEN
<there was no WCS information present>
ELSE IF ( AST_GETC( WCSINFO, 'Class', STATUS ) .NE. 'FrameSet' ) THEN
<something unexpected was read (i.e. not a FrameSet)>
ELSE
<WCS information was read OK>
END IF
For more information about detecting errors in AST routines, see
. For details of how to validate input data
read by AST, see
and
.
AST A Library for Handling World Coordinate Systems in Astronomy