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.
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 rather more efficiently than ASCII ones.
The FitsPlusTableBuilder
handler also reads a variant of the FITS format - see Section 3.6.2.