next up previous FITS Documents
Next: Example 4 Up: Example Index Tables Previous: Example 2

Example 3

Same as example 2, except that the index includes additional information about the range of values in the other columns.

XTENSION= 'BINTABLE'           / binary table extension
BITPIX  =                    8 / 8-bit bytes
NAXIS   =                    2 / 2-dimensional binary table
NAXIS1  =                   28 / width of table in bytes
NAXIS2  =                  256 / number of rows in table
PCOUNT  =                    0 / size of special data area
GCOUNT  =                    1 / one data group (required keyword)
TFIELDS =                    6 / number of fields in each row
TTYPE1  = 'Ind_Pointer'        / label for field   1
TFORM1  = '1J      '           / data format of field: 4-byte INTEGER
TTYPE2  = 'Ind_Length'         / label for field   2
TFORM2  = '1J      '           / data format of field: 4-byte INTEGER
TTYPE3  = 'Time_MIN'           / label for field   3
TFORM3  = '1D      '           / data format of field: 8-byte DOUBLE
TTYPE4  = 'Time_MAX'           / label for field   4
TFORM4  = '1D      '           / data format of field: 8-byte DOUBLE
TTYPE5  = 'PHA_MIN'            / label for field   5
TFORM5  = '1I      '           / data format of field: 2-byte INTEGER
TTYPE6  = 'PHA_MAX'            / label for field   6
TFORM6  = '1I      '           / data format of field: 2-byte INTEGER
EXTNAME = 'Spatial_Index'      / this is a spatial index of a FITS table
INDTABLE= `myfile.fits:BINTABLE:EVENTS:1'  / name of the indexed table
IAXIS   =                    2 / dimensionality of the index: 1, 2, 3, ...
ITYPE1  = 'X       '           / first index column name
IAXIS1  =                   16 / number of bins in this axis of the index
ISTRT1  =                   1. / beginning value of first index bin
IDELT1  =                  32. / width of the index bin
ITYPE2  = 'Y       '           / 2nd index column name
IAXIS2  =                   16 / number of bins in this axis of the index
ISTRT2  =                   1. / beginning value of 2nd index bin
IDELT2  =                  32. / width of the index bin
END

The table contains 16 x 16 = 256 rows and 6 columns:

    IND_POINTER  IND_LENGTH  TIME_MIN  TIME_MAX  PHA_MIN  PHA_MAX
    -----------  ----------  --------  --------  -------  -------
         1          320       11035     41700       13     110
       321          505        5010     42150       18     123
         .           .           .         .         .       .