NAME

sxspixgti - Create Hitomi SXS GTI files.

USAGE

sxspixgti mkffile outfile outpixfile

DESCRIPTION

The sxspixgti task merges pixel-dependent and pixel-independent SXS GTI to create a combined SXS GTI file with extensions representing good (EXTNAME=GTIPIXEL) and bad (EXTNAME=GTIPIXELOFF) pixel-dependent GTI. The latter is used in the ahexpmap task.

Users may input pixel-dependent GTI in the form of a lost GTI file identified by the parameter 'gtilost', and/or may construct such GTI from the MKF file specifed by the parameter 'mkffile' using applicable expressions identified using the 'selectfile' and 'label' parameters. These GTI may be merged with another pixel-independent GTI specifed by the 'gtifile' parameter. Either an MKF file, lost GTI file, or both must be input.

The input lost GTI file must have an extension named GTILOST, DETNAM keyword set to PIXEL, and three columns: START, STOP, and PIXEL. The sxspixgti task uses gtiinvert to create GTI for time intervals for each pixel that do not correspond to lost events.

Standard GTI pixel-specific expressions are stored in the CALDB select file specified by the 'selectfile' parameter in the rows specified by the 'label' parameter. These expressions are used to derive the pixel-dependent GTI derived from the MKF file specified by the parameter 'mkffile'. By default, 'label' is set to PIXELEXP##, where "##" takes on the appropriate value for each pixel (e.g., for pixel 0, "label=PIXELEXP00").

The ahgtigen task is invoked for each of the 36 pixels to merge the good GTI per pixel formed from combining the inverted lost GTI and MKF-associated GTI with any generally applicable GTI specified by the 'gtifile' parameter. These 36 GTI are then merged to create the GTIPIXEL extension in the output file that represents the sorted pixel-dependent good time intervals, and includes PIXEL as well as START and STOP columns. The GTIPIXELOFF extension in the output file that represents the sorted pixel-dependent bad time intervals is created by first inverting the good GTI per pixel described above, and then merging these in the same way as was done for the GTIPIXEL extension. The extensions are sorted, in order of precedence, by START, STOP, and PIXEL column values. The coordevt task is applied to each extension to calculate coordinates up to the level of FOC starting from PIXEL.

In addition to the output file (with name specifed by the 'outpixfile' parameter) with the GTIPIXEL and GTIPIXELOFF extensions, sxspixgti optionally creates two additional output files if the 'outfile' parameter is not set to NONE. This parameter is treated as a filename root -- the names of the files created are formed by appending "_good.gti" and "_bad.gti" to the 'outfile' string. These files have separate extensions for each of the 36 pixels, with one file containing the pixel-on (or "good") GTI, and the other the pixel-off (or "bad") GTI. All extensions in both files contain only START and STOP columns. The names of the extension names have the format GTIPIXnn (e.g., GTIPIX00 for pixel 0... GTIPIX35 for pixel 35, etc.) for the pixel-on extension and GTIPIXOFFnn (e.g., GTIPIXOFF00 for pixel 0... GTIPIXOFF35 for pixel 35, etc.) for the pixel-off extension.

PARAMETERS

mkffile = in.mkf [filename NONE|file name]
Input MKF filename, or NONE if no MKF file is used.

outfile = NONE [filename NONE|file name]
Root name of the 36-extension output good and bad GTI files, or NONE if no such files are to be created. The full names of the output files are obtained by appending the strings "_good.gti" or "_bad.gti" to the root name, for the good and bad GTI, respectively.

outpixfile = pixall.out [filename]
Output file containing two extensions, GTIPIXEL (good GTI) and GTIPIXELOFF (bad GTI). These GTI tables have a PIXEL column in addition to the START and STOP columns.

selectfile = CALDB [string CALDB|file name]
Input file with selection expressions. If the parameter is set to CALDB, the file is read from the calibration database. This parameter is ignored if 'mkffile=NONE'.

(gtilost = NONE) [filename NONE|file name]
Input lost GTI file name, or NONE if no lost GTI file is used..

(label = PIXELEXP##) [string]
Screening expression label in 'selectfile' to use for creating pixel-dependent GTI from 'mkffile' ("##" will be replaced with each pixel number by the task). This parameter is ignored if 'mkffile=NONE'.

(gtiexpr = NONE) [string NONE|expression]
Additional GTI expression to apply to 'mkffile', or NONE. This parameter is ignored if 'mkffile=NONE'.

(gtifile = NONE) [filename NONE|file name]
Input GTI filename, or NONE if no additional GTI file is used.

(mergegti = AND) [string AND|OR]
Merge mode for combining GTI.

(upkeyword = yes) [boolean yes|no]
If 'upkeyword' is set to yes, timing keywords are updated.

(leapsecfile = REFDATA) [string CALDB|REFDATA|file name]
Name of the leap second file. If the parameter is set to CALDB or REFDATA, the file in CALDB or the REFDATA area, respectively, is used.

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

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

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

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

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

(prefr = 0.0) [double]
Pre-time interval factor [0,1]. For a group of time tags (associated with the input file parameters) that are included in a given GTI, this factor moves the earliest GTI start time to an earlier value. The shift in time is the product of 'prefr' and the time interval between the earliest time tag included in the GTI and the first preceding time tag (outside the GTI).

(postfr = 1.0) [double]
Post-time interval factor [0,1]. For a group of time tags (associated with the input file parameters) that are included in a given GTI, this factor moves the latest GTI stop time to a later value. The shift in time is the product of 'postfr' and the time interval between the latest time tag included in the GTI and the first following time tag (outside the GTI).

(teldeffile = CALDB) [filename CALDB|file name]
Name of the telescope definition (teldef) file, specifying the coordinate systems and transformation properties. If the parameter is set to CALDB, the file is read from the calibration database.

(randomize = TELDEF) [string yes|no|teldef]
If 'randomize' is set to no, coordevt assumes that each event occurred at the center of its coordinate pixel. If 'randomize=TELDEF', randomization depends on the keyword RANCOORD in the teldef file ('RANCOORD=NONE' disables randomization). If 'randomize=yes', the coordinates starting from system specifed in the RANCOORD keyword are calculated assuming a random location within the pixel in this system.

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

(cleanup = yes) [boolean yes|no]
Delete temporary files if 'cleanup=yes'.

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

(chatter = 2) [integer 0|1|2|3]
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 DEFAULT|NONE|file name]
Log file name. If set to DEFAULT, uses the name of the task and, if preceded by "!", overwrites the file if it exists. If set to NONE, no log file is created.

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

(history = yes) [boolean yes|no]
Records tool parameters in HISTORY.

EXAMPLES

  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
    

SEE ALSO

ahgtigen, coordevt

LAST MODIFIED

November 2, 2023