Imports WCS information from the supplied FitsChan into the supplied NDF FTS1_WCSIM
’
s
WCS component. This is done by connecting the base Frames of the two FrameSets with a
UnitMap (on the assumption that they are equivalent). The modified FrameSet is then
stored back in the NDF (the NDF library will automatically remove any PIXEL, GRID and
AXIS Frames from the FrameSet as these are generated afresh each time NDF_GTWCS is
called).
The supplied FitsChan may contain more than one description (or "
encoding"
) of the
FrameSet to be added to the NDF, each encoding using a different set of header cards. These
encodings may not all be consistent with each other. For instance, if a Starlink application
stores a FrameSet twice in a FITS header using FITS-WCS and AST native encodings, an
IRAF application may then modify the FITS-WCS encoding without making equivalent
modifications to the native encoding. In this case, we should use the FITS-WCS encoding in
preference to the native encoding when reconstructing the NDFs WCS component. On the other
hand, if the two encodings were still consistent, it would be preferable to use the native
encoding since the FITS-WCS encoding may not give a complete description of the original
FrameSet.
The choice of encoding has several stages:
o If the caller has supplied a list of preferred encodings in the ENCODS argument, then the first available encoding in this list is used. o If no preferred encodings are supplied, then a check is made to see if a native encoding is available. If there is no native encoding, then the default encoding supplied by AST is used. This will be a non-native encoding selected on the basis of the header cards available in the FitsChan. o If a native encoding is available, and is the only available encoding, then it is used. o If both native and non-native encodings are available, then the first non-native encoding to be found which is inconsistent with the native encoding is used. If all encodings are consistent, then the native encoding is used. The first inconsistent encoding is used on the assumption that software which modifies the native encoding (i.e. mainly Starlink software) will also modify the non-native encodings so that they remain consistent. Foreign software however (i.e. non-AST software) will probably not bother to modify the native encoding when the non-native encoding is modified.
’
s WCS information.