NAME

sximodegti -- Create GTI excluding dead time for each SXI observing mode

USAGE

sximodegti infile outfile mergefile tstart tstop

DESCRIPTION

'sximodegti' creates a Good Time Interval (GTI) for each supported SXI mode (full window, 1/8 window, full window+burst, 1/8 window+burst, 1/8 window+area discrimination, and the full window+0.1 sec burst used for the Crab). These GTIs are used for exposure map generation. The task reads as input the exposure FFF file, and creates GTI(s) for all the modes found.

The SXI exposure file for an observation contains rows of exposure packets that corresponds to a 3x3 and 5x5 event packet (contained separately in the event list). Each CCD and segment combination is contained in one row in the exposure, so there should be 8 rows per time stamp in this file. However, the file contains information for all 'modes' run during the observation, including different DATACLASS (operating configuration), events, iframe, dframe, and rframe. Only some of these are supported for science data. This script reads the exposure file and creates a GTI extension for each combination of CCD_ID, SEGMENT, and supported science mode, keeping track of the total number of frames for proper calculation of the exposure time.

There are two output files whose names are set by the parameters 'outfile' and 'mergefile'. The first output 'outfile' contains a GTI extension for each DATACLASS and frame. Each extension contains START, STOP, and frame number (FRAMENUM) columns. The task also checks if a CCD_ID+SEGMENT combination is missing or appears more than once. The information is output to the logfile of the task. The second output 'mergefile' contains a GTI extension per DATACLASS, where GTIs for different CCD_ID+SEGMENT combinations are merged into one (using a logical 'AND'). The number of unique DATACLASS values is also output to the parameter 'numdclass'.

Only times within the range specified by the 'tstart' and 'tstop' parameters are included in the output GTIs. Normally these are the start and stop times of pointed observations, to exclude the slew data. If the parameters 'tstart' or 'tstop' are outside of the range covered by the exposure file, then the file TSTART or TSTOP header keywords are used instead.

PARAMETERS

infile [filename]
Input SXI exposure file.

outfile [filename]
Output GTI file. This file has one extension per combination of DATACLASS, CCD_ID, and SEGMENT.

mergefile [file]
Output GTI file with merged dataclasses. This file has one extension per DATACLASS.

tstart [real]
Start time for pointed observations [sec]. If the TSTART of 'infile' is later than this value, then that TSTART is used instead.

tstop [real]
Stop time for pointed observations [sec]. If the TSTOP of 'infile' is earlier than this value, then that TSTOP is used instead.

(numdclass = 0) [integer]
Output: Total number of dataclasses found.

(cleanup = yes) [boolean]
If set to yes, temporary files are deleted ([yes]/no).

(clobber = no) [boolean]
Overwrites the existing output file if set to yes (yes/[no]).

(chatter = 1) [integer]
Chatter level for output. Set to 0 to suppress output, or to 1, 2, or 3 for increasing the chatter of the output.

(logfile = !DEFAULT) [string]
Log filename. If set to DEFAULT uses the name of the task and, if preceded by '!', overwrite the file if it exists. If set to NONE no log file is created.

(debug = no) [boolean]
Diagnostic output is printed out on the screen if set to yes (yes/[no]).

(history = yes) [boolean]
Records tool parameters in HISTORY if set to yes ([yes]/no).

(mode = ql) [string ql|hl|q]
Mode to query the parameter file. Acceptable values include: "ql" (query and learn/remember), "hl" (hidden and learn/remember), "q" (query but don't remember), "h" (hidden).

EXAMPLES

  1. Run sximodegti with default parameters.
    sximodegti infile=ah00050733sxi_a0exp.fits.gz outfile=ah000507033sxi_mode.gti.gz \
         mergefile=ah000507033sxi_seg.gti.gz tstart=47390384. tstop=47430516.
    

SEE ALSO

sxiphas, sxiflagpix, sxipi, mgtime

LAST MODIFIED

February 3, 2016