#Template file for FT1 files - Aug 14, 2003 Definition

#########################
#Primary HDU template
SIMPLE   = T / file does conform to FITS standard
BITPIX   = 8 / number of bits per data pixel
NAXIS    = 0 / number of data axes
EXTEND   = T / FITS dataset may contain extensions
CHECKSUM = 0 / checksum for entire HDU
DATASUM  = 0 / checksum for data table
TELESCOP = GLAST / name of telescope generating data
INSTRUME = 'LAT' / name of instrument generating data
EQUINOX  = 2000.0 / equinox for ra and dec
RADECSYS = 'FK5' / world coord. system for this file (FK5 or FK4)
DATE     = 'yyyy-mm-dd' / date file was made in yyyy-mm-dd
DATE-OBS = 'yyyy-mm-ddThh:mm:ss.ssss' / start date and time of the observation (UTC)
DATE-END = 'yyyy-mm-ddThh:mm:ss.ssss' / end date and time of the observation (UTC)
FILENAME = 'GLL_EVSUM_YYMMDD_C#_V##.FIT' / name of this file
ORIGIN   = 'LIOC' / name of organization making file
AUTHOR   = 'NAME_OF_PERSON' / name of person responsible for file generation
CREATOR  = 'EVENT_SUMMARY_MAKER_V##' / software and version creating file
VERSION  = 0.0 / integer? string? (TBD)  release version of the file
SOFTWARE = 0 / version of the processing software

######################
#LAT Event Summary HDU template
XTENSION = 'BINTABLE' / binary table extension
BITPIX   = 8 / 8-bit bytes
NAXIS    = 2 / 2-dimensional binary table
NAXIS2   = 0 / number of rows in table
CHECKSUM = 0 / checksum for entire HDU
DATASUM  = 0 / checksum for data table
TELESCOP = 'GLAST' / name of telescope generating data
INSTRUME = 'LAT' / name of instrument generating data
EQUINOX  = 2000.0 / equinox for ra and dec
RADECSYS = 'FK5' / world coord. system for this file (FK5 or FK4)
DATE     = 'yyyy-mm-dd' / date file was made in yyyy-mm-dd
DATE-OBS = 'yyyy-mm-ddThh:mm:ss.ssss' / start date and time of the observation (UTC)
DATE-END = 'yyyy-mm-ddThh:mm:ss.ssss' / end date and time of the observation (UTC)
EXTNAME  = 'EVENTS' / name of this binary table extension
HDUCLASS = 'OGIP' / format conforms to OGIP standard
HDUCLAS1 = 'EVENTS' / extension contains events
HDUCLAS2 = 'ALL' / extension contains all events detected
TSTART   = 0. / mission time of the start of the observation
TSTOP    = 0. / mission time of the end of the observation
MJDREF   = 58300. / MJD corresponding to SC clock start
TIMEUNIT = 's' / units for the time related keywords
TIMESYS  = 'TT' / type of time system that is used
TIMEREF  = 'LOCAL' / reference frame used for times
TASSIGN  = 'SATELLITE' / location where time assignment performed
CLOCKAPP = F / whether a clock drift correction has been applied
GPS_OUT  = F / whether GPS time was unavailable at any time during this interval
OBS_ID   = 0 / observation ID number
OBJECT   = 'sky' / observed object
PSR_COLS = F / whether columns for pulsar analyses are included in this file
MC_TRUTH = F / whether the Monte Carlo truth columns are included in this file
NDSKEYS  = 0 / number of data subspace keywords in header

#Column definition: required columns
TTYPE# = 'ENERGY' / energy of event
TFORM# = 'E' / data format of field: 4-byte REAL
TUNIT# = 'MeV' / physical unit of field
TLMIN# = 0.0 / minimum value
TLMAX# = 10000000.0 / maximum value
TTYPE# = 'RA'  / right ascension (J2000) of event
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = 'deg' / physical unit of field
TLMIN# = 0.0   / minimum value
TLMAX# = 360.0 / maximum value
TTYPE# = 'DEC' / declination (J2000) of event
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = 'deg' / physical unit of field
TLMIN# = -90.0 / minimum value
TLMAX# = 90.0  / maximum value
TTYPE# = 'THETA'  / inclination angle of event in instrument coordinates
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = 'deg' / physical unit of field
TLMIN# = 0.0   / minimum value
TLMAX# = 180.0 / maximum value
TTYPE# = 'PHI'  / azimuthal angle of event in instrument coordinates
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = 'deg' / physical unit of field
TLMIN# = 0.0   / minimum value
TLMAX# = 360.0 / maximum value
TTYPE# = 'ZENITH_ANGLE' /  zenith angle of event
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = 'deg' / physical unit of field
TLMIN# = 0.0   / minimum value
TLMAX# = 180.0 / maximum value
TTYPE# = 'EARTH_AZIMUTH_ANGLE' /   Earth azimuth (from north to east) of event
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = 'deg' / physical unit of field
TLMIN# = 0.0   / minimum value
TLMAX# = 360.0 / maximum value
TTYPE# = 'TIME' / Mission Elapsed Time
TFORM# = 'D'   / data format of field: 8-byte DOUBLE
TUNIT# = 's'   / physical unit of field
TLMIN# = 0.0   / minimum value
TLMAX# = 10000000000. /  maximum value
TTYPE# = 'EVENT_ID' / ID number of original event
TFORM# = 'J'   / data format of field: 4-byte INTEGER
TUNIT# = ''    / physical unit of field: dimensionless
TLMIN# = 0     / minimum value
TLMAX# = 2147483647 /  maximum value
TTYPE# = 'RECON_VERSION' / version of event reconstruction software
TFORM# = 'I'   / data format of field: 2-byte INTEGER
TUNIT# = ''    / physical unit of field: dimensionless
TLMIN# = 0     / minimum value
TLMAX# = 32767 / maximum value
TTYPE# = 'CALIB_VERSION' / versions of calibration tables for the ACD, CAL, TKR
TFORM# = '3I'  / data format of field: 2-byte INTEGER
TUNIT# = ''    / physical unit of field: dimensionless

#Columns for event screening by users (still under discussion)
#These columns are required in all FT1 files.
TTYPE# = 'IMGOODCALPROB' / classification tree probability that CAL energy is well measured
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = ''    / physical unit of field: dimensionless
TLMIN# = 0.0   / minimum value
TLMAX# = 1.0   / maximum value
TTYPE# = 'IMVERTEXPROB' / classification tree probability that the vertex gives a better measure of the direction than the best track alone
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = ''    / physical unit of field: dimensionless
TLMIN# = 0.0   / minimum value
TLMAX# = 1.0   / maximum value
TTYPE# = 'IMCOREPROB' / classification tree probability that the event is in the core of the PSF
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = ''    / physical unit of field: dimensionless
TLMIN# = 0.0   / minimum value
TLMAX# = 1.0   / maximum value
TTYPE# = 'IMPSFERRPRED' / classification tree prediction of the PSF for this event, normalized to the 68% point predicted from an analytic model
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = ''    / physical unit of field: dimensionless
TLMIN# = 0.0   / minimum value
TLMAX# = 100.0 / maximum value
TTYPE# = 'CALENERGYSUM' / sum of the raw energies in all the crystals
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = 'MeV' / physical unit of field
TLMIN# = 0.0   / minimum value
TLMAX# = 10000000. / maximum value
TTYPE# = 'CALTOTRLN' / total radiation lengths integrated along trajectory of first track
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = ''    / physical unit of field: dimensionless
TLMIN# = 0.0   / minimum value
TLMAX# = 100.0 / maximum value
TTYPE# = 'IMGAMMAPROB' / classification tree probability that the event is a gamma-ray
TFORM# = 'E'   / data format of field: 4-byte REAL
TUNIT# = ''    / physical unit of field: dimensionless
TLMIN# = 0.0   / minimum value
TLMAX# = 1.0   / maximum value
TTYPE# = 'CONVERSION_POINT' /      reconstructed 3-space conversion point in instr. coords.
TFORM# = '3E' /  data format of field: 4-byte REAL
TUNIT# = 'm'  /  physical unit of field
TTYPE# = 'CONVERSION_LAYER' /      conversion layer in TKR, -1 means not in TKR
TFORM# = 'I'  /  data format of field: 2-byte INTEGER
TUNIT# = ''   /  physical unit of field: dimensionless
TLMIN# = -1   /  minimum value
TLMAX# = 18   /  maximum value

#Optional columns for pulsar analyses:
#Set PSR_COLS = T (header keyword of this extension) when those columns are included in a file.
#TTYPE# = 'PULSE_PHASE' /   pulse phase of event arrival time
#TFORM# = 'D'   / data format of field: 8-byte DOUBLE
#TUNIT# = ''    / physical unit of field
#TLMIN# = 0.0   / minimum value
#TLMAX# = 1.0   / maximum value
#TTYPE# = 'GEOTIME' /       event arrival time at geocenter
#TFORM# = 'D'   / data format of field: 8-byte DOUBLE
#TUNIT# = 's'   / physical unit of field
#TLMIN# = 0.0   / minimum value
#TLMAX# = 10000000000. / maximum value
#TTYPE# = 'BARYTIME' /      event arrival time at solar system barycenter
#TFORM# = 'D'   / data format of field: 8-byte DOUBLE
#TUNIT# = 's'   / physical unit of field
#TLMIN# = 0.0   / minimum value
#TLMAX# = 10000000000. / maximum value
#TTYPE# = 'BINTIME' /       binary-demodulated event arrival time at solar system barycenter
#TFORM# = 'D'   / data format of field: 8-byte DOUBLE
#TUNIT# = 's'   / physical unit of field
#TLMIN# = 0.0   / minimum value
#TLMAX# = 10000000000. /  maximum value
#TTYPE# = 'GEO_OFFSET' /    offset of Earth center from S/C
#TFORM# = '3D'  / data format of field: 4-byte REAL
#TUNIT# = 'm'   / physical unit of field
#TTYPE# = 'BARY_OFFSET' /   offset of solar system barycenter from Earth center
#TFORM# = '3D'  / data format of field: 4-byte REAL
#TUNIT# = 'm'   / physical unit of field

#################################
#Good Time Interval Extension HDU template
XTENSION = 'BINTABLE' / binary table extension
BITPIX   = 8 / 8-bit bytes
NAXIS    = 2 / 2 dimensional binary table
NAXIS1   = 16 / width of table in bytes
NAXIS2   = 0 / number of rows in table
#THEAP    = 0 / integer? (TBD)  
TFIELDS  = 2 / Number of fields in each row
CHECKSUM = 0 / checksum for entire HDU
DATASUM  = 0 / checksum for data table
TELESCOP = 'GLAST' / name of telescope generating data
INSTRUME = 'LAT' / name of instrument generating data
EQUINOX  = 2000.0 / equinox for ra and dec
RADECSYS = 'FK5' / world coord. system for this file (FK5 or FK4)
DATE     = 'yyyy-mm-dd' / date file was made in yyyy-mm-dd
DATE-OBS = 'yyyy-mm-ddThh:mm:ss.ssss' / start date and time of the observation (UTC)
DATE-END = 'yyyy-mm-ddThh:mm:ss.ssss' / end date and time of the observation (UTC)
EXTNAME  = 'GTI' / name of this binary table extension
HDUCLASS = 'OGIP' / format conforms to OGIP standard
HDUCLAS1 = 'GTI' / extension contains good time intervals
HDUCLAS2 = 'ALL' / extension contains all science time
TSTART   = 0.0 / mission time of the start of the observation
TSTOP    = 0.0 / mission time of the end of the observation
MJDREF   = 58300. / MJD corresponding to SC clock start
TIMEUNIT = 's' / units for the time related keywords
TIMESYS  = 'TT' / type of time system that is used
TIMEREF  = 'LOCAL' / reference frame used for times
TASSIGN  = 'SATELLITE' / location where time assignment performed
CLOCKAPP = F / whether a clock drift correction has been applied
GPS_OUT  = F / whether GPS time was unavailable at any time during this interval
ONTIME   = 0.0 / sum of GTI lengths
TELAPSE  = 0.0 / time between START of the first GTI and STOP of the last

#Column definition
TTYPE# = 'START' / start time of good time intervals
TFORM# = 'D'     / data format of field: 8-byte DOUBLE
TUNIT# = 's'     / physical unit of field
TLMIN# = 0.0     / minimum value
TLMAX# = 10000000000. / maximum value
TTYPE# = 'STOP'  / stop time of good time intervals
TFORM# = 'D'     / data format of field: 8-byte DOUBLE
TUNIT# = 's'     / physical unit of field
TLMIN# = 0.0     / minimum value
TLMAX# = 10000000000. / maximum value
