next up previous
Next: Adding Individual Cards to a FitsChan
Up: Storing AST Objects in FITS Headers (FitsChans)
Previous: Extracting Individual Cards from a FitsChan

The Native FitsChan Output Format

If we print out the FITS header cards describing the SkyFrame we wrote earlier ([*]), we should obtain something like the following:

COMMENT AST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ AST
COMMENT AST            Beginning of AST data for SkyFrame object             AST
COMMENT AST ................................................................ AST
BEGAST_A= 'SkyFrame'           / Description of celestial coordinate system     
NAXES_A =                    2 / Number of coordinate axes                      
AX1_A   = '        '           / Axis number 1                                  
BEGAST_B= 'SkyAxis '           / Celestial coordinate axis                      
ENDAST_A= 'SkyAxis '           / End of object definition                       
AX2_A   = '        '           / Axis number 2                                  
BEGAST_C= 'SkyAxis '           / Celestial coordinate axis                      
ENDAST_B= 'SkyAxis '           / End of object definition                       
ISA_A   = 'Frame   '           / Coordinate system description                  
SYSTEM_A= 'FK4-NO-E'           / Celestial coordinate system type               
EPOCH_A =               1958.0 / Besselian epoch of observation                 
ENDAST_C= 'SkyFrame'           / End of object definition                       
COMMENT AST ................................................................ AST
COMMENT AST               End of AST data for SkyFrame object                AST
COMMENT AST ---------------------------------------------------------------- AST

As you can see, this resembles the information that would be written to a basic Channel to describe the same SkyFrame ([*]), except that it has been formatted into 80-character header cards according to FITS conventions.

There are also a number of other differences worth noting:

1.
There is no unnecessary information about default values provided for the benefit of the human reader. This is because the Full attribute for a FitsChan defaults to -1, thus suppressing this information (c.f. [*]). You can restore the information if you wish by setting Full to 0 or +1, in which case additional COMMENT cards will be generated to hold it.
2.
The information is not indented, because FITS does not allow this. However, if you change the Full attribute to 0 or +1, comments will be included that are intended to help break up the sequence of headers and highlight its structure. This will probably only be of use if you are attempting to track down a problem by examining the FITS cards produced in detail.

3.
The FITS keywords which appear to the left of the ``='' signs have additional characters (``_A'', ``_B'', etc.) appended to them. This is done in order to make each keyword unique.

This last point is worth further comment and is necessary because the FITS standard only allows for certain keywords (such as COMMENT and HISTORY) to appear more than once. astWrite therefore appends an arbitrary sequence of two characters to each new keyword it generates in order to ensure that it does not duplicate any already present in the FitsChan.

The main risk from not following this convention is that some software might ignore (say) all but the last occurrence of a keyword before passing the FITS headers on. Such an event is unlikely, but would obviously destroy the information present, so astWrite enforces the uniqueness of the keywords it uses. The extra characters added are ignored when the information is read back.

As with a basic Channel, you can also suppress the comments produced in a FitsChan by setting the boolean (integer) Comment attribute to zero ([*]). However, FITS headers are traditionally generously commented, so this is not recommended.



next up previous
Next: Adding Individual Cards to a FitsChan
Up: Storing AST Objects in FITS Headers (FitsChans)
Previous: Extracting Individual Cards from a FitsChan

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
30th April 2003
E-mail:ussc@star.rl.ac.uk

Copyright (C) 2003 Central Laboratory of the Research Councils