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 astWrite method will return zero if the write operation would required the use of the -TAB algorithm, and the astRead method will return a NULL pointer 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 astWrite 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 astGetTables method, and the data (and headers) within it copied into a new FITS binary table extension. See astGetTables 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 astRead 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 astPutTables or astPutTable) before invoking the astRead method. Secondly, if the application does not know which FITS binary tables will be needed by astRead, then it can register a call-back function with the FitsChan using method astTableSource. This call-back function will be called from within astRead 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 astRead. Note, currently astRead can only handle -TAB headers that describe 1-dimensional (i.e. separable) axes.

Type:
Integer.

Applicability

FitsChan
All FitsChans have this attribute.