NAME

gtiinvert - create a gti file by inverting the time intervals of an input gti file

USAGE

gtiinvert infile outfile

DESCRIPTION

'gtiinvert' produces a new FITS GTI (Good Time Interval) 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' behavior 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'.

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]
Create the first and last GTI based on the TSTART/TSTOP specified by the parameters 'tstart' and 'tstop'.

(tstart = DEFAULT) [string]
Value to use for TSTART in seconds. If set to DEFAULT, then the value is taken from the TSTART keyword of the infile.

(tstop = DEFAULT) [string]
Value to use for TSTOP in seconds. If set to DEFAULT, then the value is taken from the TSTOP keyword of the infile.

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

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

(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 '!' overwrites the file if 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.

(history = yes) [boolean]
Records tool parameters in HISTORY if set to yes

(mode = ql) [string]
Mode of automatic parameters

EXAMPLES

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 
   

SEE ALSO

ahgtigen.html

LAST MODIFIED

February 1 ,2016