sxspixgti - Create SXS GTI files


sxspixgti mkffile outfile outpixfile


'sxspixgti' creates SXS pixel dependent GTI file by merging GTI that are not pixel dependent with pixel depenedent GTI. The output file includes two extensions: the 'good' pixel GTI (EXTNAME=GTIPIXEL) and a 'bad' pixel GTI (EXTNAME=GTIPIXELOFF).
The input pixel dependent GTIs are defined either in the telemetered lost GTI file (parameter gtilost) or by pixel depenedent expressions applicable to the MKF file (paramaters mkffile , selectfile, label). These GTIs are merged with others not pixel dependent GTI (parameter gtifile). Therefore the inputs to 'sxspixgti' are either the MKF file or a GTI lost file or both as well as a GTIs file non pixel dependent. If the MKF file is set to NONE, the GTI lost file must be input and vice-versa.
The input GTI lost file is expected to have an extension named GTILOST, the keywords DETNAM set to PIXEL and the three columns START STOP and PIXEL. 'sxspixgti' uses 'gtiinvert' to create the invert either good or bad GTI. The lost GTI are inverted per pixel selecting the start and stop appropriate to the pixel number from the PIXEL column (a). These 36 GTIs are combined with other GTI and create the GTIPIXEL extension in the output.
The GTI pixel dependent expression are stored in CALDB in the select file. These expressions are used to create (b) good pixel GTI. The (b) GTI are merged with (a) GTI and other GTI to create the GTIPIXEL extension.
'ahgtigen' is used to create and merge the good GTI per pixel. The good GTI are merged running 36 times one per pixel using mkffile, the inverse per pixel of the GTI LOST and gtifile The label parameter is used in 'ahgtigen' with the CALDB selectfile to calculate GTI from the mkffile. By default label is set to PIXELEXP##, where ## is replaced with a pixel number, e.g. PIXELEXP00, PIXELEXP01, etc. The 36 GTI pixel extensions are combined into a single extension and the column PIXEL is populated with the pixel number appropriate for that GTI interval. The bad pixel GTI are created by inverting the 36 extensions and combining in a sigle extension with the PIXEL column populated with the pixel number appropriate for that GTI interval.

a The task creates one output file with two extensions each containg three columns START and STOP and PIXEL. The extension GTIPIXEL contains the 'good' GTI and the extension GTIPIXELOFF the 'bad' pixel GTI. Both GTIPIXEL and GTIPIXELOFF are sorted by START then STOP then PIXEL and 'coordevt' is run to calculate coordinates up to FOC. The extension GTIPIXELOFF is used in the 'ahexpmap'.

By setting the parameter outfile different from NONE (default), the final start and stop per pixel calculated in the process are saved in two files, one for the good GTI and the other with the bad GTI, both containing 36 extensions one per pixel. These extension only contains START and STOP. The extensions for each pixel are named GTIPIXnn, e.g. GTIPIX00, GTIPIX01, etc. for the good pixel gti and GTIPIXOFFnn, e.g. GTIPIXOFF00, GTIPIXOFF01 etc. for the bad pixel gti.


mkffile [filename]
Input MKF file

outfile [filename]
Root name of the 36-ext GTI file. To the root name is addeded "_good.gti" or " _bad.gti" for the good and bad GTI respectively

outpixfile [filename]
Output file containing two extensions, GTIPIXEL (good) and GTIPIXELOFF (bad), where the PIXEL column list the pixel number appropriate for that START and STOP.

selectfile [string]
Input expression file

(gtilost = NONE) [filename]
Input GTI lost file (or NONE)

(label = PIXELEXP##) [string]
Screening expression label in labelfile (## replaced with pixel number)

(gtiexpr = NONE) [string]
Additional GTI expression (or NONE)

(gtifile = NONE) [filename]
Input GTI file (or NONE)

(mergegti = AND) [string]
Merge mode (OR, [AND])

(upkeyword = yes) [boolean]
Update timing keywords ([yes],no)

(leapsecfile = REFDATA) [string]
Input leap second file (or CALDB, [REFDATA])

(instarts = START) [string]
Input column with GTI start times

(instops = STOP) [string]
Input column with GTI stop times

(time = TIME) [string]
Input column with HK parameter times

(outstart = START) [string]
Output column with GTI start times

(outstop = STOP) [string]
Output column with GTI stop times

(prefr = 0.) [real]
Pre-time interval factor [0,1]

(postfr = 1.) [real]
Post-time interval factor [0,1]

(teldeffile = CALDB)[string]
Name of the Telescope Definition (TelDef), specifying the coordinate systems and transformation properties. If the parameter is set to CALDB, the default, a TelDef file for the telescope and SXS is read from the calibration database.

(randomize = TELDEF) [string]
If this parameter is set to 'no', 'coordevt' assumes that each event occurred at the center of its coordinate pixel. If 'randomize=TELDEF', the default, randomization depends on the keyword RANCOORD in the TELDEF file ('RANCOORD = NONE' disables randomization). If 'randomize=yes', the coordinates from system 'randsys' (see below) onward is calculated assuming a random location within the randsys system pixel. This parameter only controls randomization in transformations previous to the transformation to the SKY system.

(seed = 0) [integer]
Random number generator seed; uses system time for seed=0.

(cleanup = yes) [boolean]
Delete temporary files ([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 ([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).


  1. The following command calculates GTI for SXS pixels using the selection file in CALDB and the default label of PIXELEXP##:

    sxspixgti mkffile=in.mkf outfile=sxs_pixels.gti outpixfile=sxs_pxexpo.gti selectfile=CALDB


None, but see help for individual parameters above.


ahgtigen mxsgti


August 2016