FITS is a very well-established format for storage of
astronomical table or image data
This reader can read tables stored in
XTENSION='TABLE') table extensions;
any image data is ignored.
Currently, binary table extensions are read much more efficiently
than ASCII ones.
When a table is stored in a BINTABLE extension in an uncompressed FITS file on disk, the table is 'mapped' into memory; this generally means very fast loading and low memory usage. FITS tables are thus usually efficient to use.
Limited support is provided for the semi-standard HEALPix-FITS convention; such information about HEALPix level and coordinate system is read and made available for application usage and user examination.
A private convention is used to support encoding of tables with more than 999 columns (not possible in standard FITS); this was discussed on the FITSBITS mailing list in July 2017 in the thread BINTABLE convention for >999 columns.
Header cards in the table's HDU header will be made available as table parameters. 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.
Any 64-bit integer column with a non-zero integer offset
is represented in the read table as Strings giving the decimal integer value,
since no numeric type in Java is capable of representing the whole range of
possible inputs. Such columns are most commonly seen representing
unsigned long values.
Where a multi-extension FITS file contains more than one table, a single table may be specified using the position indicator, which may take one of the following forms:
with one primary HDU and two BINTABLE extensions,
you would view the first one using the name "
and the second one using the name "
The suffix "
#0" is never used for a legal
FITS file, since the primary HDU cannot contain a table.
EXTNAME header in the HDU,
or alternatively the value of
followed by "
-" followed by the value of
This follows the recommendation in
the FITS standard that
headers can be used to identify an HDU.
So in a multi-extension FITS file "
where a table extension
it could be referenced as
cat.fits#UV_DATA" or "
Matching of these names is case-insensitive.
Files in this format may contain multiple tables;
depending on the context, either one or all tables
will be read.
Where only one table is required,
either the first one in the file is used,
or the required one can be specified after the
#" character at the end of the filename.
This format can be automatically identified by its content so you do not need to specify the format explicitly when reading FITS tables, regardless of the filename.
There are actually two FITS-based input handlers,
The former will work on any FITS file, and acquires its metadata
only from the FITS header of the relevant TABLE/BINTABLE HDU itself;
the latter works on FITS-plus files,
and acquires metadata from the embedded VOTable header.
To retrieve all the tables in a multi-extension FITS files,
use one of the
makeStarTables methods of