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'.
gtiinvert infile=test_gti_in.fits outfile=test_gti_out.fits outext=GTIOUT