.help GTISYNCH Jun99 ASTROE
.ih
NAME
GTISYNCH -- Modifies/Adjusts GTI START and END time stamps depending upon the values of the time frames in the input event file(s).

.ih
USAGE
   gtisynch eventfile gtifile out_gtifile frac_exposure
.ih
DESCRIPTION
GTISYNCH uses the time frames in the input event files to modify and adjust 
the GTI intervals in the GTI file  

The CCD-based instruments collect data in exposures which are several seconds
long. If the starts and stops of GTIs occur in the middle of a CCD 
exposure period, this tool will try to adjust them to either the beginning or
end of the time frame in the event file. 
   
.ih
PARAMETERS
.ls eventfile [string]
The file name and the extension of the input event fits file. 
If the file name is preceded with a @, it is a ASCII file, which contains
the list of the event file name/extensions, one per each line.  
.le

.ls gtifile [string]
The file name and the extension of the input GTI fits file. 
.le

.ls outfile [string]
The output gti file. If it has the same name as the input gti file, it will be 
appended to or overwrite the original file, depending on whether the 
clobber parameter is set. 
.le

.ls expofrac [real]
The fraction of the exposure to be included in a GTI.
.le

.ls (begin = "FRAME_ST_AETIMES") [string] 
Column containing frame begin times in event extension.
.le

.ls (end = "FRAME_END_AETIMES") [string] 
Column containing frame end  times in event extension.
.le

.ls (frames_ext = "FRAMES") [string] 
The name of extension containing frames.
.le

.ls (start = "START") [string] 
Column containing GTI start times in input GTI extension.
.le

.ls (stop = "STOP") [string] 
Column containing GTI stop times in input GTI extension.
.le

.ls (gti_ext = "STDGTI") [string] 
The name of extension containing gtis.
.le

.ls (clobber = "yes") [string] 
Delete outfile if it exists?
.le

.ih
EXAMPLES 

.ls
1. Adjust the GTI file orig_gti.fits  using the event file event.fits and 
   expofrac = 0.1. The results are written to the file mod_gti.fits.
.le
.ls
     gtisynch event.fits+1 orig_gti.fits+1 mod_gti.fits 0.1    
.le
.ls
2. Adjust the GTI file  orig_gti.fits using the events file listed 
   in list.lis and expofrac = 0.1. The results are written to the 
   file mod_gti.fits.
.le
.ls
     gtisynch @list.lis orig_gti.fits+1 mod_gti.fits 0.1 
.le
.ls
   The events files are listed in the list.lis. 
.le
.ls
         event_1.fits[1] 
.le
.ls
         event_2.fits[1] 
.le
.ls
         ...
.le
.ls
         event_n.fits[1] 
.le
         
.ih 
BUGS 
   None
