next up previous contents
Next: The Philosophy of FITS Up: The Origin and Purpose Previous: The Need for FITS

1.2 What FITS Is

The fundamental unit of FITS is the FITS file, which is composed of a sequence of Header Data Units (HDUs), optionally followed by a set of special records. (The rather prosaic name HDU was the result of over a year's community discussion and failure to find anything better.) The first part of each HDU is the header, composed of ASCII card images containing keyword=value statements that describe the size, format, and structure of the data that follow. It may contain any information about the data set that its creator regards as important, such as information about the history of the data or the file, about the physical entity the data describe, or about the instrument used to gather the data. The data follow, structured as the header specifies. The size of logical records in both header and data is 23040 bits, equivalent to 2880 8-bit bytes or 36 header card images. The HDUs may be followed by special records; the only restrictions on these special records are that they have the standard 23040-bit logical record size and that they not begin with the string XTENSION. A FITS file is terminated by a logical end of file, whose precise physical nature will depend on the medium.

In its original form, a FITS file consisted solely of a single HDU, consisting of the header and a data array that was regarded as containing a digital image. This simple, one-HDU structure is known as Basic FITS. The header card images would describe the data array--the number and length of the axes and the data type of the values: unsigned one-byte, signed two-byte or four-byte integers. The original use of FITS to transport digital images is reflected in the ``Image'' in its name. However, even the data matrix of Basic FITS could be used to transmit any kind of multidimensional array, not simply an image. The first HDU of a FITS file, called the primary HDU, must still follow the Basic FITS format, although it need not contain any data.

FITS is no longer restricted to integer arrays.The array data may be Institute of Electrical and Electronics Engineers (IEEE) 32-bit or 64-bit floating point. The Basic FITS primary HDU may be followed other HDUs, called extensions, containing different data structures. Standard data formats include two kinds of tables: tables with ASCII entries and tables with binary entries, as well a multidimensional array extension format that allows extensions to contain the same type of data that is in the primary HDU. It is also possible to create non-standard formats, for use locally or as prototype designs for new standard formats.

Although its name implies ``image'' transport, FITS is not a graphics format designed simply for the transfer of pictures;it does not incorporate ``FITS viewers'', packages for decoding the data into an image. Users must develop or obtain separate software to read and display the data from the FITS file. Because of its wide use, FITS is supported by all the major astronomical imaging packages, and a number of other packages of FITS utilities and software are publicly available. The data structure is an essential part of the format and is available to the users. This property distinguishes FITS from many other data standards--those that are primarily labeling systems, and those for which the user accesses a hidden data structure through a set of standard tools.


next up previous contents
Next: The Philosophy of FITS Up: The Origin and Purpose Previous: The Need for FITS