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.
This means that constructing the StarTable is very fast, and a FITS
table of any size can be examined, not limited by available memory.
Subsequent reads may take time, however, since a read from a mapped
file is done each time.
To inhibit this behaviour, 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,
and it reads it all into memory at once.
Currently, binary tables are read rather more efficiently than ASCII ones.