next up previous contents index
Next: 5.4.2 Other Reserved Keywords Up: 5.4 Keywords Previous: 5.4 Keywords

Subsections

5.4.1 Mandatory Keywords

Mandatory  keywords are required in every HDU as described in the remainder of this subsection. They may be used only as described in this standard.   Values of the mandatory keywords must be written in fixed format.

5.4.1.1 Principal

The SIMPLE keyword  is required to be the first keyword in  the primary header of all FITS files. Principal mandatory keywords other than SIMPLE are required in all FITS headers. The card images of any primary header must contain the keywords shown in Table 5.1 in the order   given.   No other keywords may intervene between the SIMPLE keyword and the last NAXISn keyword.


 
Table 5.1: Mandatory keywords for primary header.
1 SIMPLE
2 BITPIX
3 NAXIS
4 NAXISn, n = 1, ..., NAXIS
   
  (other keywords)
   
last END

The total number of bits in the primary data array, exclusive of fill that is needed after the data to complete the last record (§4.3.2), is given by the  following expression:

Nbits = |BITPIX| × (NAXIS1 × NAXIS2 × ... × NAXISm), (5.1)

where Nbits  is  non-negative and the number of bits excluding fill, m is the value  of NAXIS, and  BITPIX and  the NAXISn represent the values associated with those keywords.

SIMPLE Keyword

The value field shall contain a logical constant with the value T if the file conforms to this standard. This keyword is mandatory for the primary header and is not permitted in extension headers. A value of F signifies that the file does not conform to this standard.  

BITPIX Keyword

The value field shall contain an integer. The  absolute value is used in computing the sizes of data structures. It shall specify the number of bits that represent a data value. The only valid values of BITPIX are given in Table 5.2.


 
Table 5.2: Interpretation of valid BITPIX value.
   
Value Data Represented
8 Character or unsigned binary integer
16 16-bit twos-complement binary integer
32 32-bit twos-complement binary integer
-32 IEEE single precision floating point
-64 IEEE double precision floating point

NAXIS Keyword

The value field shall contain a non-negative integer no greater than 999, representing the number of axes in the associated data  array. A value of zero signifies that no data follow the header in the  HDU.

NAXISn Keywords

  The value field of this indexed keyword  shall contain a non-negative integer, representing the number of elements along axis n of a data array. The NAXISn must be present for all values n = 1,...,NAXIS, and for no other values of n. A value of zero for any of the NAXISn signifies that no data follow the header in the  HDU. If NAXIS is equal to 0, there should not be any  NAXISn keywords.

END Keyword

This keyword has no associated value. Columns 9-80  shall be filled with ASCII blanks.

5.4.1.2 Conforming Extensions

All conforming extensions must use the keywords  defined in Table 5.3 in the order   specified. No other keywords may intervene between the XTENSION keyword and the last NAXISn keyword. This organization is required for any conforming extension, whether or not further specified in this standard.


 
Table 5.3: Mandatory keywords in conforming extensions.
1 XTENSION
2 BITPIX
3 NAXIS
4 NAXISn, n = 1, ..., NAXIS
   ...
  (other keywords, including ...)
  PCOUNT
  GCOUNT
   ...
last END

The total number of bits in the extension data array exclusive of fill that is needed after the data to complete the last record such as that for the primary data array 4.3.2) is given by the  following expression:

Nbits = |BITPIX| × GCOUNT × (PCOUNT+NAXIS×...×NAXISm), (5.2)

where Nbits is  non-negative and the number of bits excluding fill, m is the value  of NAXIS, and  BITPIX, GCOUNT, PCOUNT, and  the NAXISn represent  the  values associated with those keywords.

XTENSION Keyword

The value field shall contain a character string giving  the name  of the extension type. This keyword is mandatory for an extension header and must not appear in the primary header . For an extension that is not a standard  extension, the type name must not be the same as that of a standard  extension.

The IAUFWG  may specify additional type names that must be used only to identify specific types of extensions; the full list shall be available from the FITS Support  Office.

PCOUNT Keyword

The value field shall contain an integer that shall be  used in any way appropriate to define the data structure, consistent with Eq. 5.2.

GCOUNT Keyword

The value field shall contain an integer that shall be  used in any way appropriate to define the data structure, consistent with Eq. 5.2.

EXTEND Keyword

  The use of  extensions  necessitates a single additional keyword  in the primary header  of the FITS file.   If the FITS file may contain extensions, a card image  with the keyword EXTEND and the value field containing the logical value T must appear in the primary header immediately after the last NAXISn card  image, or, if NAXIS=0, the NAXIS card  image. The presence of this keyword with the value T in the primary header does not require that extensions be present.


next up previous contents index
Next: 5.4.2 Other Reserved Keywords Up: 5.4 Keywords Previous: 5.4 Keywords

5/13/1999