NAME gtselect - Performs selection cuts in event data fles. USAGE gtselect infile outfile ra dec rad tmin tmax emin emax zmax DESCRIPTION gtselect creates a new FITS file of selected rows from an input event data file based on user-specified cuts that are applied to each row of the input file. This application enables detailed selections to be made on data obtained from the FSSC data server or generated using gtobssim, the tool that generate simulated data (see gtobssim help). The most common selections are these involving time range (minimum and maximum time) and energy range (minimum and maximum energy). For each cut that is applied Data Subspace (DSS) keywords are written to the EVENTS header of the output FITS file that describe the selection. This information is used by the likelihood tools and gtrspgen for computing exposure-related information. PARAMETERS infile [file] Input event FITS file. This is the file containing the event data. outfile [file] Output event FITS file with events that satisfy the selection performed with gtselect. ra [double] Right ascension of acceptance cone (J2000) in decimal degrees. If the parameter is set to INDEF the ra will be read from the header of the input file. dec [double] Declination of acceptance cone (J2000) in decimal degrees. If the parameter is set to INDEF the dec will be read from the header of the input file. rad = 180 [double] Radius of acceptance cone (decimal degrees). A value of 180 indicates that no acceptance cone cut will be applied. If the parameter is set to INDEF the radius will be read from the header of the input file. tmin = 0 [double] Event arrival time lower limit in mission elapsed time (MET) seconds. All the events in the output FITS file will have "event arrival time" larger than this value. The reference time used for MET is midnight (0h:0m:0s) on January 1, 2001, in Coordinated Universal Time (UTC). The FERMI convention is that MJDREF=51910 (UTC)=51910.0007428703703703703 (TT); the fractional part of MJDREF in the TT system compensates for the use of midnight in the UTC system as the reference time. MJDREF is divided into two keywords: MJDREFI=51910, the integer part; and MJDREFF=7.428703703703703D-4, the fractional part. If the parameter is set to INDEF tmin will be read from the header of the input file. tmax = 0 [double] Event arrival time upper limit in mission elapsed time (MET) seconds. All the events in the output FITS file will have "event arrival time" smaller than this value. A value of zero in this context means that no upper limit will be applied. If the parameter is set to INDEF the tmax will be read from the header of the input file. emin = 30 [double] Minimum event energy in MeV. All the events in the output FITS file will have "event energy" larger than this value. emax = 3e5 [double] Maximum event energy in MeV. All the events in the output FITS file will have "event energy" smaller than this value. zmax = 180 <0-180> [double] Maximum apparent zenith angle (degrees). This is a hidden parameter. The default value is 180. (evclsmin = 0) [integer] Mininum event class ID to include. Each set of IRFs will define a set of event classes numbered 0 to n, where n+1 is the number of event classes. These numbers will be ordered such that the more inclusive classes are numbered lowest. Currently, there are three event classes and gtselect will default to class 3, which will be optimal for a mayority of analyses. Refer to "Cicerone": http://fermi.gsfc.nasa.gov/ssc/data/analysis/documentation/Cicerone/ for a description of event classifications. (evclsmax = 10) [integer] Maximum event class ID to include. (convtype = -1) [integer] Conversion type. 0=Front, 1=Back, -1=both (phasemin = 0) [double] Minimum pulsar phase to include. This cut is only applied if the PULSE_PHASE column has been added to the FT1 file by the gtpphase tool. (phasemax = 1) [double] Maximum pulsar phase to include. (evtable = EVENTS) [string] Event data extension. (chatter = 2) This parameter fixes the output verbosity: no screen output (0), nominal screen output (2), maximum verbosity (4). This is a hidden parameter. The default value is 2. (clobber = yes) Overwrite or do not overwrite existing output files. This is a hidden parameter. The default value is "yes". (debug = no) Activate debugging mode. This is a hidden parameter. The default value is "no". When debug is "no", all exceptions that are not caught and handled by individual tool-specific code are caught by a top-level exception handler that displays information about the exception and then exits. When debug is "yes", such exceptions are not caught by the top level code. Instead the tool produces a segmentation violation, which is more useful for debugging. When debugging mode is enabled, the tool produces more verbose output describing any errors or exceptions that are encountered. (gui = no) Graphical user Interface (GUI) mode activated if "yes" is specified. This is a hidden parameter. The default value is "no". (mode = ql) Mode of automatic parameters. This is a hidden parameter. The default value is "ql". EXAMPLES The way that the parameters are passed follows the FTOOLs model. They could be passed by answering from a prompt, as a list in a command line, or by editing the parameter file. The command line option facilitates calling gtselect from a script. To prompt for gtselect type in the command line: > gtselect This will prompt for parameter values. Beware that not all parameters are prompted. Some of the parameter are "hidden". If you want to change one of the "hidden" parameter you should specify its value in the command line. For example if you do not want to overwrite the existing output file, type in the command line: > gtselect clobber=no An example of how to run the tool is given below: In this case the quasar 3C279 (centered on Ra=193.98, Dec=-5.82) was simulated using gtobssim (see gtobssim for further explanation), although the indentical procedure could be followed for actual data, with a photon spectral index of 1.96, an integrated flux of 3.48e-4 m^-2s^-1, until a radius of 40 degrees . The energy for the simulated events ranges between 20 MeV and 200000 MeV. Using gtselect it possible to select the events with energy larger than 100 MeV and within a radius of 20 degrees centered on Ra=193.98, Dec=-5.82 and a time range between 220838400 and 225590400 MET seconds: > gtselect Input FT1 file [] : 3C279_events_0000.fits Output FT1 file [] : 3c279_filtered.fits RA for new search center (degrees) (0:360) [0] : 193.98 Dec for new search center (degrees) (-90:90) [0] : -5.82 radius of new search region (degrees) (0:180) [180] : 20 start time (MET in s) (0:) [0] : 220838400 end time (MET in s) (0:) [0] : 225590400 lower energy limit (MeV) (0:) [30] : 100 upper energy limit (MeV) (0:) [300000] : 100000 maximum zenith angle value (degrees) (0:180) [180]: 105 Done. The last example could be also run from the command line as: > gtselect infile=3C279_events_0000.fits outfile=3c279_filtered.fits ra=193.98 dec=-5.82 rad=20 tmin=220838400 tmax=225590400 emin=100 emax=100000 zmax=105 You can also use the defaults in the input file header by using the INDEF syntax > gtselect infile=3C279_events_0000.fits outfile=3c279_filtered.fits ra=INDEF dec=INDEF rad=INDEF tmin=INDEF tmax=INDEF emin=100 emax=100000 zmax=105 KNOWN BUGS SEE ALSO fselect gtvcut