next up previous
Next: Addressing Cards in a FitsChan
Up: Storing AST Objects in FITS Headers (FitsChans)
Previous: The FitsChan Model

Creating a FitsChan  

The FitsChan constructor function, AST_FITSCHAN, is straightforward to use:

      INCLUDE 'AST_PAR'
      INTEGER FITSCHAN, STATUS

      STATUS = 0

      ...

      FITSCHAN = AST_FITSCHAN( AST_NULL, AST_NULL, 'Encoding=NATIVE', STATUS )

Here, we have omitted any source or sink functions by supplying the AST_NULL routine for the first two arguments (remember to include the AST_PAR include file which contains the required EXTERNAL statement for this routine). We have also initialised the FitsChan's Encoding attribute to NATIVE. This indicates that we will be using the native encoding ([*]) to store and retrieve Objects. If this was left unspecified, the default would depend on the FitsChan's contents. An attempt is made to use whatever encoding appears to have been used previously. For an empty FitsChan, the default is NATIVE, but it does no harm to be sure.



next up previous
Next: Addressing Cards in a FitsChan
Up: Storing AST Objects in FITS Headers (FitsChans)
Previous: The FitsChan Model

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 210
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