'gtiinvert' produces a new FITS GTI (Good Time Inverval) file where the time intervals
are calculated by inverting the time intervals of an input GTI file.
'gtiinvert' operates on a FITS GTI file, where the times of the intervals are written in the
START and STOP columns. The times are seconds from a start time
written in the header MJDREF/FI keywords.
By default the 1st interval in the output GTI file starts with the first gap in the input GTI file, e.g. the 1st
start time in the START column of the output GTI corresponds to the 1st interval stop time of
the input GTI. Similar the last interval in the output GTI
file correspond to the last gap of the input GTI file. e.g. the last stop time in the STOP
column of the output GTI correspond to the last interval start time
in the input file. This is the 'gtiinvert' behaviour when the parameters 'tstart' and 'tstop' set to 'DEFAULT'.
By setting the parameters 'tstart' and/or 'tstop' to values different than 'DEFAULT' and 'margingti' to 'yes',
'gtiinvert' uses these values to set the 1st interval start time and/or the last interval stop time in the output GTI file respectively.
The parameter 'dt' defines a delta time around each interval in the output GTI file as show below.
INPUT GTI: ---------------------| |-------------------------------- OUTPUT GTI: |dt|------------------|dt|The output GTI file has only two columns , START and STOP and the extension name may be specified with the parameter 'outext'.
Invert a GTI file named test_gti_in.fits and named the output GTI extension GTIOUT
gtiinvert infile=test_gti_in.fits outfile=test_gti_out.fits outext=GTIOUT