NAME

gtiinvert - Create a GTI file by inverting the time intervals from an input GTI file

USAGE

gtiinvert infile outfile

DESCRIPTION

The gtiinvert task inverts the time intervals of an input GTI (Good Time Interval) FITS file, producing a new GTI FITS file. In a GTI file, the times of beginning and end of the intervals are written in the START and STOP columns. The times are in units of seconds from a start time that is written in the header MJDREF/FI keywords.

If 'margingti=no', the first interval in the output GTI file corresponds to the first gap in the input GTI file (i.e., the first start time in the output file equals the first stop time in the input file). Similarly, the last interval in the output file corresponds to the last gap in the input file (i.e., the last stop time of the output GTI equals the last start time in the input file).

If 'margingti=yes', then gtiinvert forces the use of the values of the input parameters 'tstart' and 'tstop' as the earliest and latest time values respectively in the GTI time intervals. If either 'tstart' or 'tstop' is set to DEFAULT, then the TSTART or TSTOP keyword respectively from the input header supplies the value.

The parameter 'dt' defines a delta time that creates gaps between the output and input GTI such that the output GTI start times begin 'dt' later than the end of the appropriate input GTI, and the output GTI stop times end earlier by 'dt' than the beginning of the appropriate input GTI. This is illustrated below:


   INPUT GTI:   --------------|                   |------------------
   OUTPUT GTI:                |dt|-------------|dt|

The output GTI file consists of only two columns, START and STOP, and the extension name may be specified with the parameter 'outext'.

PARAMETERS

infile [filename]
Name of input GTI FITS file.

outfile [filename]
Name of output GTI FITS file.

outext [string]
Name of extension in output GTI FITS file.

(margingti = yes) [boolean yes|no]
If 'margingti=yes', the earliest and latest times in the output GTI are specified by the parameters 'tstart' and 'tstop' respectively.

(tstart = DEFAULT) [string]
Value to use for TSTART [s]. If set to DEFAULT, the value is taken from the TSTART keyword of 'infile'. Ignored if 'margingti=no'.

(tstop = DEFAULT) [string]
Value to use for TSTOP [s]. If set to DEFAULT, the value is taken from the TSTOP keyword of 'infile'. Ignored if 'margingti=no'.

(dt = 0) [double]
Delta time [s] added to all GTI start times and subtracted from all GTI stop times in the output GTI.

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

(chatter = 1) [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 "!", overwrited 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. Invert a GTI file named test_gti_in.fits and name the output GTI extension GTIOUT.
  2.    gtiinvert infile=test_gti_in.fits outfile=test_gti_out.fits outext=GTIOUT 
    

    SEE ALSO

    ahgtigen

    LAST MODIFIED

    September 7, 2021