Next: 8.3.4 Data Display
Up: 8.3 Binary Table Extension
Previous: 8.3.2 Other Reserved Keywords
Subsections
The data in a binary table extension shall consist of a
Main Data Table which may, but need not, be followed by
additional bytes. The positions in the last
data record after the last additional byte, or, if there are no
additional bytes, the last character of the last row of the data
array, shall be filled by setting all bits to zero.
The table is constructed from a two-dimensional byte array.
The number of bytes in a row shall be specified by the value of
the NAXIS1 keyword and the number of rows shall be
specified by the NAXIS2 keyword
of the associated header records. Within a row, fields shall
be stored in order of increasing column number, as determined from
the n of the TFORMn keywords.
The number of bytes in a row and the number of rows in the
table shall determine the size of the byte array. Every row
in the array shall have the same number of bytes. The
first row shall begin at the start of the record
immediately following the last header record. Subsequent rows
shall begin immediately following the
end of the previous row, with no intervening bytes,
independent of the record structure. Words need not
be aligned along word boundaries.
Each row in the array shall consist of a sequence of fields.
The number of elements in each field and their data type shall
be specified in keywords of the associated header records. A
separate format keyword must be provided for each field. The
location and format of fields shall be the same for every row.
Fields may be empty, if the repeat
count specified in the value of the
TFORMn keyword of the header is 0. The following
data types, and no others, are permitted.
If the value of
the TFORMn keyword specifies data type L, the contents
of field n shall consist of ASCII T indicating true or
ASCII F, indicating false. A 0 byte (hexadecimal 0) indicates
an invalid value.
If the value of
the TFORMn keyword specifies data type X, the
contents of field n shall consist of a sequence of bits
starting with the most significant bit; the bits following shall be
in order of decreasing significance, ending with the least
significant bit. A bit array shall be composed of
an integral number of bytes, with those bits following the end of the
data set to zero. No null value is defined for bit arrays.
If the value of the TFORMn keyword specifies
data type A, field n
shall contain a character string of
zero or more members,
composed of ASCII text. This character string may
be terminated before the length specified by
the repeat count by
an ASCII NULL (hexadecimal code 00).
Characters after the first ASCII NULL are not defined.
A string with the number of characters
specified by the repeat count is not
NULL terminated.
Null strings are defined by the presence of
an ASCII NULL as the first character.
If the value of
the TFORMn keyword specifies data type B, the
data in field n shall consist of unsigned 8-bit integers,
with the most significant bit first, and
subsequent bits in order of decreasing significance.
Null values are given by the value of the
associated TNULLn keyword.
If the value of
the TFORMn keyword specifies data type I, the
data in field n shall consist
of twos-complement signed 16-bit integers,
contained in two bytes.
The most significant byte shall be first.
Within each byte the
most significant bit shall be first, and
subsequent bits shall be in order of decreasing significance.
Null values are given by the value of the
associated TNULLn keyword.
Unsigned integers can be represented using the convention described
in § 6.2.4.
If the value of
the TFORMn keyword specifies data type J, the
data in field n shall consist
of twos-complement signed 32-bit integers,
contained in four bytes.
The most significant byte shall be first, and
subsequent bytes shall be in order of decreasing significance.
Within each byte, the most significant bit shall be first, and
subsequent bits shall be in order of decreasing significance.
Null values are given by the value of the
associated TNULLn keyword.
Unsigned integers can be represented using the convention described
in § 6.2.4.
If the value of the TFORMn keyword
specifies data type E, the data in
field n shall consist of
ANSI/IEEE-754 [15] 32-bit floating point
numbers, as described in Appendix H.
All IEEE special values are recognized.
The IEEE NaN is used to represent invalid values.
If the value of the TFORMn keyword
specifies data type D, the data in
field n shall consist of ANSI/IEEE-754 [15]
64-bit double precision floating point
numbers, as described in Appendix H.
All IEEE special values are recognized.
The IEEE NaN is used to represent invalid values.
If the value of the TFORMn keyword
specifies data type C, the data in
field n shall consist of a sequence of pairs of
32-bit single precision
floating point numbers.
The first member of each pair shall represent the real part
of a complex number, and the second member
shall represent the imaginary part of that complex number.
If either member contains a NaN, the entire complex value
is invalid.
If the value of the TFORMn keyword
specifies data type M, the data in
field n shall consist of a sequence of pairs of
64-bit double precision floating point numbers.
The first member of each pair shall represent the real part
of a complex number, and the second member of the pair
shall represent the imaginary part of that complex number.
If either member contains a NaN, the entire complex value
is invalid.
If the value of the TFORMn keyword
specifies data type P, the data in
field n shall consist of not more than
one pair of 32-bit integers.
The meaning of these integers is not defined
by this standard. The proposed application of this data type is
described in Appendix B.1.
The main data table shall be followed by zero or more bytes,
as specified by the value of the PCOUNT keyword.
The meaning of these bytes is not further defined by this standard.
One proposed application is described in Appendix B.1.
Next: 8.3.4 Data Display
Up: 8.3 Binary Table Extension
Previous: 8.3.2 Other Reserved Keywords
5/13/1999