next up previous FITS Documents
Next: Example 7 Up: Example Index Tables Previous: Example 5

Example 6

The table is not sorted on any columns except for the implicit 'row number' column that is in every table. In this case the index just lists the min and max value of each column in bins of 1000 rows each. The IND_POINTER and IND_LENGTH columns are redundant since the same information is provided by the ISTRT1 and IDELT1 keywords, but they are included for clarity.

XTENSION= 'BINTABLE'           / binary table extension
BITPIX  =                    8 / 8-bit bytes
NAXIS   =                    2 / 2-dimensional binary table
NAXIS1  =                   44 / width of table in bytes
NAXIS2  =                   50 / number of rows in table
PCOUNT  =                    0 / size of special data area
GCOUNT  =                    1 / one data group (required keyword)
TFIELDS =                   10 / 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  = 'X_MIN'              / label for field   5
TFORM5  = '1J      '           / data format of field: 2-byte INTEGER
TTYPE6  = 'X_MAX'              / label for field   6
TFORM6  = '1J      '           / data format of field: 2-byte INTEGER
TTYPE7  = 'Y_MIN'              / label for field   7
TFORM7  = '1J      '           / data format of field: 2-byte INTEGER
TTYPE8  = 'Y_MAX'              / label for field   8
TFORM8  = '1J      '           / data format of field: 2-byte INTEGER
TTYPE9  = 'PHA_MIN'            / label for field   9
TFORM9  = '1I      '           / data format of field: 2-byte INTEGER
TTYPE10 = 'PHA_MAX'            / label for field  10
TFORM10 = '1I      '           / data format of field: 2-byte INTEGER
EXTNAME = 'TABLE_INDEX'        / this extension is an index of a FITS table
INDTABLE= `myfile.fits:BINTABLE:EVENTS:1' / name of the table that is indexed
IAXIS   =                 1    / dimensionality of the index
ITYPE1  = '(row#)  '           / reserved virtual column name
IAXIS1  =                50    / number of bins in this axis of the index
ISTRT1  =                 1.   / beginning value of first index bin
IDELT1  =              1000.   / width of the index bin
END

The table contains 50 rows and 10 columns:

IND_POINTER IND_LENGTH TIME_MIN TIME_MAX X_MIN X_MAX Y_MIN Y_MAX PHA_MIN PHA_MAX
----------- ---------- -------- -------- ----- ----- ----- ----- ------- ----
    1         1000      11035.    41700.   17   490    23    502    13     11
 1001         1000       5010.    42150.   26   468     5    511    18    123
   .            .          .         .     .     .      .     .      .      .