next up previous contents index
Next: 8.3.2 Other Reserved Keywords Up: 8.3 Binary Table Extension Previous: 8.3 Binary Table Extension

Subsections

8.3.1 Mandatory Keywords

  The XTENSION keyword is the first keyword of all binary table extensions. The seven keywords  following (BITPIX ... TFIELDS) must be in the order specified in Table 8.4, with no intervening keywords.


 
Table 8.4: Mandatory keywords in binary table extensions.
1 XTENSION
2 BITPIX
3 NAXIS
4 NAXIS1
5 NAXIS2
6 PCOUNT
7 GCOUNT
8 TFIELDS
  .
.
.
  (other keywords, which must include ...)
  TFORMn, n=1, 2, ..., k where k is the value of TFIELDS
  .
.
.
last END

XTENSION Keyword

The  value field shall contain the character  string 'BINTABLE'.

BITPIX Keyword

The value field shall contain the integer 8, denoting  that the array is an array of 8-bit bytes.

NAXIS Keyword

The value field shall contain the integer 2, denoting  that the included data array is two-dimensional: rows and columns.

NAXIS1 Keyword

The value field shall contain a non-negative integer, giving  the number of 8-bit bytes in each row of the table.

NAXIS2 Keyword

The value field shall contain a non-negative integer, giving  the number of rows in the table.

PCOUNT Keyword

The value field  shall contain the number of bytes that follow the table in the associated extension data.

GCOUNT Keyword

The value field shall contain the integer 1; the data  records contain a single table.

TFIELDS Keyword

The value field shall contain a non-negative integer representing  the number of fields in each row. The maximum permissible value is 999.

TFORMn Keywords

The value field of this indexed keyword shall contain a  character string of the form rTa. The repeat count r is  the ASCII representation of a non-negative integer specifying the number of elements in field n. The default value of r is 1; the repeat count need not be present if it has the default value. A zero element count, indicating an empty  field, is permitted. The data type T specifies the data type of the contents of field n. Only the data types in Table 8.5 are permitted. The format codes must be specified in upper case. For fields of type P, the only permitted repeat counts are 0 and 1. The additional characters a are optional and are not further defined in this standard. Table 8.5 lists the number of bytes each data type occupies in a table row. The first field of a row is numbered 1. The total number of bytes nrow in a table row is given by


nrow      =TFIELDS

i=1
ribi
(8.2)
where ri is the repeat count for field i, bi is the number of bytes for the data type in field i, and TFIELDS is the value of that keyword, must equal the value of  NAXIS1.


 
Table 8.5: Valid TFORMn data types in BINTABLE extensions.
     
TFORMn value Description 8-bit Bytes
L Logical 1
X Bit *
B Unsigned byte 1
I 16-bit integer 2
J 32-bit integer 4
A Character 1
E Single precision floating point 4
D Double precision floating point 8
C Single precision complex 8
M Double precision complex 16
P Array Descriptor 8

* number of 8-bit bytes needed to contain all bits

END Keyword

This keyword has no associated value. Columns 9-80  shall contain ASCII blanks.


next up previous contents index
Next: 8.3.2 Other Reserved Keywords Up: 8.3 Binary Table Extension Previous: 8.3 Binary Table Extension

5/13/1999