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:
#include <string.h> ... if ( !astOK ) { <an error occurred (a message will have been issued)> } else if ( wcsinfo == AST__NULL ) { <there was no WCS information present> } else if ( strcmp( astGetC( wcsinfo, "Class" ), "FrameSet" ) ) { <something unexpected was read (i.e. not a FrameSet)> } else { <WCS information was read OK> }
For more information about detecting errors in AST functions, see
. For details of how to validate input data
read by AST, see
and
.
AST A Library for Handling World Coordinate Systems in Astronomy