next up previous FITS Documents
Next: About this document ... Up: Example Index Tables Previous: Example 6

Example 7

The same as example 1 except that the size of the index has been compressed by deleting all rows with IND_LENGTH = 0. The fact that the table has been compressed is evident from the fact that NAXIS2 is less than IAXIS1. This case requires that the IND_START1 column be added to give the starting time of each index bin.

XTENSION= 'BINTABLE'           / binary table extension
BITPIX  =                    8 / 8-bit bytes
NAXIS   =                    2 / 2-dimensional binary table
NAXIS1  =                   16 / width of table in bytes
NAXIS2  =                   20 / number of rows in table
PCOUNT  =                    0 / size of special data area
GCOUNT  =                    1 / one data group (required keyword)
TFIELDS =                    3 / number of fields in each row
TTYPE1  = 'IND_START1'         / label for field   1
TFORM1  = '1D      '           / data format of field: 8-byte DOUBLE
TTYPE2  = 'Ind_Pointer'        / label for field   2
TFORM2  = '1J      '           / data format of field: 4-byte INTEGER
TTYPE3  = 'Ind_Length'         / label for field   3
TFORM3  = '1J      '           / data format of field: 4-byte INTEGER
EXTNAME = 'Time_Index'         / this is a time-ordered index of a FITS table
INDTABLE= `myfile.fits:BINTABLE:EVENTS:1' / name of the indexed table
IAXIS   =                    1 / dimensionality of the index
ITYPE1  = 'TIME    '           / first index column name
ISTRT1  =               10000. / beginning value of first index bin
IDELT1  =                1000. / width of the index bin
IAXIS1  =                  40  / number of bins in this axis of the index
END

The table contains 20 rows and 3 columns:

 IND_START1    IND_POINTER   IND_LENGTH
 ----------    -----------   ----------
    10000.         1          70            
    11000.        71          80
    15000.       151          20
    16000.       171          37
       .           .           .