Next Previous Up Contents
Next: Column-oriented FITS
Up: Supplied Input Handlers
Previous: Supplied Input Handlers

3.5.1 FITS

The FitsTableBuilder class can read FITS binary (BINTABLE) and ASCII (TABLE) table extensions. Unless told otherwise the StarTableFactory.makeStarTable method will find the first table extension in the named FITS file.

If the name supplied to the StarTableFactory ends in a "#" sign followed by an identifier however, it means that the requested table is in the indicated extension of a multi-extension FITS file. This identifier may be given in one of two forms:

To retrieve all the tables in a multi-extension FITS files, use one of the makeStarTables methods of StarTableFactory instead.

If the table is stored in a FITS binary table extension in a file on local disk in uncompressed form, then the file will be mapped rather than read when the StarTable is constructed, which means that constructing the StarTable is very fast. If you want to inhibit this behaviour, you can refer to the file as a URL, for instance using the designation 'file:spec23.fits' rather than 'spec23.fits'; this fools the handler into thinking that the file cannot be mapped.

Header cards in the table's HDU header will be made available as table parameters (see getParameters). Only header cards which are not used to specify the table format itself are visible as parameters (e.g. NAXIS, TTYPE* etc cards are not). HISTORY and COMMENT cards are run together as one multi-line value.

Currently, binary tables are read more efficiently than ASCII ones.

The FitsPlusTableBuilder handler also reads a variant of the FITS format - see Section 3.6.2.

This handler can read tables with more than the BINTABLE limit of 999 columns, as discussed in Section 3.8.1.


Next Previous Up Contents
Next: Column-oriented FITS
Up: Supplied Input Handlers
Previous: Supplied Input Handlers

STIL - Starlink Tables Infrastructure Library
Starlink User Note252
STIL web page: http://www.starlink.ac.uk/stil/
Author email: m.b.taylor@bristol.ac.uk