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 first table extension in the named FITS file will be used. If the name supplied to the StarTableFactory ends in a # sign followed by a number however, it means that the requested table is in the indicated extension of a multi-extension FITS file. Hence 'spec23.fits#3' refers to the 3rd extension (4th HDU) in the file spec23.fits. The suffix '#0' is never used in this context for a legal FITS file, since the primary HDU cannot contain a table.

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.

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

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


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

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