gtrspgen Help File

Creates a "Detector Response Matrix" (DRM or RSP) FITS file from the multi-dimensional response functions.

Usage: gtrspen respalg specfile scfile outfile irfs time thetacut dcostheta ebinalg emin emax enumbins denergy ebinfile

gtrspgen produces a Response Matrix (RSP) file required to analyze a binned spectrum in an OGIP-standard (i.e., XSPEC compatible) format. The response matrix is computed from the detailed response functions provided by the LAT instrument team. The elements of the matrix are directly related to the probability of an incident photon with a true energy of E being detected by the LAT with an apparent energy E'. The source position, the observation time, and energy grid are extracted from a PHA1 (spectrum) file, while the pointing/livetime history file provides the instrument orientation during the observation. The gtrspgen tool has two main options:

  • GRB for short observations during which the instrument's pointing does not change significantly. This is relevant for most gamma-ray burst observations.
  • PS for an observation relevant to a point source over more than a fraction of an orbit, requiring that the instrument response be averaged over the different source directions in instrument coordinates.

Two input files are required:

  • A pointing history or "spacecraft" file covering the time of the observation, which can be obtained from SLAC's Data Portal.
  • A PHA1 file, which can be created using the gtbin tool.

In binned spectral analysis, the apparent energies are binned. For the LAT data, the data have to be binned into energy channels (a PHAI file) using, the gtbin tool. But the first step in the analysis is to select all the counts from a region of 10 to 15 degrees around the burst position from the time range that includes the burst. These counts can be selected using the gtselect tool.

Example: gtrspgen

Parameters are passed followinb the FTOOLs model: by answering from a prompt; as a list in a command line; or by editing the parameter file.

To be prompted for gtrspgen parameter values, enter (at the command line): gtrspgen

Note: 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 want to open the GUI option enter (at the command line): gtrspgen gui=yes

An example of how to run the gtrspgen tool is given below:

> gtrspgen
This is gtrspgen version N/A
Response calculation method (GRB, PS) <GRB|PS> [GRB] :
Spectrum file name [] : GRB.pha
Spacecraft data file name [] : spacecraft_data_file.fits
Output file name [] : GRB.rsp
Time of GRB (s) [0.] : 252374400
Response function to use, Handoff|DC2|DC2A|DC2FA|DC2BA|DC2FB etc [P6_V3_DIFFUSE] :
Algorithm for defining true energy bins <FILE|LIN|LOG> [LOG] :
Start value for first energy bin in MeV [30.] :
Stop value for last energy bin in MeV [200000.] :
Number of logarithmically uniform energy bins [100] :

In this case, the GRB option was chosen. The spectrum file was generated previously with gtbin with the name: GRB.pha.

The same task can also be run from the command line as follows:

>gtrspgen respalg=GRB specfile=GRB.pha scfile=spacecraft_data_file.fits outfile=GRB.rsp time=252374400 irfs=P6_V3_DIFFUSE ebinalg=LOG emin=30 emax=200000 enumbins=100


Owned by: Yasushi Ikebe ikebe@milkyway.gsfc.nasa.gov
  James Peachey peachey@lheamail.gsfc.nasa.gov
Last updated by: Chuck Patterson 02/10/2011