next up previous contents
Next: Required Keywords for Binary Up: FITS Fundamentals Previous: Data Records

3.6 Binary Tables

  With the development of the IEEE-754 standard for floating point numbers, it became possible to incorporate binary values in tables. Tables with binary values are more compact, and the time spent converting from ASCII is eliminated, although display is not as direct as for ASCII tables. In developing the binary table design, a provision was made that a particular field or entry in the table could be a vector, not just a single number. The resulting binary table extension (Cotton, Tody, and Pence 1995; hereafter CTP) was endorsed by the IAUFWG in 1994. Like an ASCII table, a binary table contains a two-dimensional data matrix mapped into the rows and columns of a table. The entries, the values associated with a given row and column, are stored in one of several prescribed binary formats, rather than coded into ASCII. For each field there is a repeat count, which is one for a single entry and larger if the entry is to be a vector. This main table may be followed by additional data.

Appendixes to the paper proposed three additional conventions: one to handle fields where the length of an array might vary, one to allow the vector in a field to be interpreted as a multidimensional array, and one for delimiting arrays of strings. While the Working Group endorsement of binary tables did not include these conventions, the rules that were adopted reserved a number of keywords and values specifically intended for use by these conventions. These conventions are discussed in section 5.2.

In a binary table, each row consists of a series of entries in formats specified by the header keywords. The header describes the size and data type of each entry, and, optionally, provides a label, units, and the representation for an undefined value where applicable. The length and field structure of all rows of the main table in a particular binary table extension must be the same.

Every row in a particular binary table contains the same number of entries, although the number can vary from one binary table extension to the next in a FITS file. The header is a standard FITS extension header. For each table entry it specifies

The size and data type of the entry.
A label (optional).

The units (optional).

The representation of an undefined value (optional).

An entry may be omitted from the table but still defined in the header by using a zero repeat count in the value of the TFORMn keyword. Examples 4, 6, and 7 in Appendix A illustrate binary tables.

next up previous contents
Next: Required Keywords for Binary Up: FITS Fundamentals Previous: Data Records