TabOK

Should the FITS-WCS -TAB algorithm be recognised?

Description:

This attribute is an integer value which indicates if the " -TAB" algorithm, defined in FITS-WCS paper III, should be supported by the FitsChan. The default value is zero. A zero or negative value results in no support for -TAB axes (i.e. axes that have " -TAB" in their CTYPE keyword value). In this case, the AST_WRITE method will return zero if the write operation would required the use of the -TAB algorithm, and the AST_READ method will return AST__NULL if any axis in the supplied header uses the -TAB algorithm.

If TabOK is set to a non-zero positive integer, these methods will recognise and convert axes described by the -TAB algorithm, as follows:

The AST_WRITE method will generate headers that use the -TAB algorithm (if possible) if no other known FITS-WCS algorithm can be used to describe the supplied FrameSet (but see the ForceTab attribute). This will result in a table of coordinate values and index vectors being stored in the FitsChan. After the write operation, the calling application should check to see if such a table has been stored in the FitsChan. If so, the table should be retrived from the FitsChan using the AST_GETTABLES method, and the data (and headers) within it copied into a new FITS binary table extension. See AST_GETTABLES for more information. The FitsChan uses a FitsTable object to store the table data and headers. This FitsTable will contain the required columns and headers as described by FITS-WCS paper III - the coordinates array will be in a column named " COORDS" , and the index vector(s) will be in columns named " INDEX <i >" (where <i > is the index of the corresponding FITS WCS axis). Note, index vectors are only created if required. The EXTNAME value will be set to the value of the AST__TABEXTNAME constant (currently " WCS-TAB" ). The EXTVER header will be set to the positive integer value assigned to the TabOK attribute. No value will be stored for the EXTLEVEL header, and should therefore be considered to default to 1.

The AST_READ method will generate a FrameSet from headers that use the -TAB algorithm so long as the necessary FITS binary tables are made available. There are two ways to do this: firstly, if the application knows which FITS binary tables will be needed, then it can create a Fitstable describing each such table and store it in the FitsChan (using method AST_PUTTABLES or AST_PUTTABLE) before invoking the AST_READ method. Secondly, if the application does not know which FITS binary tables will be needed by AST_READ, then it can register a call-back function with the FitsChan using method AST_TABLESOURCE. This call-back function will be called from within AST_READ if and when a -TAB header is encountered. When called, its arguments will give the name, version and level of the FITS extension containing a required table. The call-back function should read this table from an external FITS file, and create a corresponding FitsTable which it should then return to AST_READ. Note, currently AST_READ can only handle -TAB headers that describe 1-dimensional (i.e. separable) axes.

Type:
Integer.

Applicability

FitsChan
All FitsChans have this attribute.