Uses co-ordinate system information in the supplied FITS headers to create WCS and
AXIS components in an NDF FTS1_FTWCS
The information needed to create the FrameSet can be stored several times in a single FITS header,
using different keywords each time. Each of these descriptions is known as an "
encoding"
and AST
supports several different encoding schemes (e.g. FITS-WCS, FITS-IRAF, DSS, NATIVE). If the
supplied FITS header contains more than one encoding then we need to choose which one to use. This
decision is important because is is possible for encodings to be inconsistent (i.e. software may modify
one encoding without making equivalent modifications to the other encodings). The simplest way to
make this decision is to hand responsibility for it over to the user. In this case, the user supplies a list
of preferred encodings, and the first of these encodings that exists in the FITS header gets
used. If the user does not know which encoding to use, then we can make an intelligent
guess by comparing the encodings to see which ones are consistent and which ones are
not.
In addition to the WCS component, this routine also creates AXIS Centre, Label and Units components in the NDF, but only if they do not already exist, and if the FrameSet read from the FITS header contains an AXIS Frame. NDF2FITS does not write out the AXIS Frame if it is equivalent to pixel co-ordinates, and so no AXIS structures will be created by this routine in this case. Also, if the AXIS Frame represents linear axis co-ordinates, then there will already be AXIS structures in the NDF (created earlier within FITSIN), and so again no AXIS structures will be created by this routine. Thus, this routine will only create AXIS structures in the cases where the axis co-ordinates are non-linear.
’
s preferred AST encodings. If NENCOD is zero, then this is ignored, and an
intelligent guess is made as to which encoding to use (see FTS1_WCSIM).