LAT GRB Analysis

1. LAT GRB Analysis

2. XSPEC: Part 1

3. XSPEC: Part 2

Also see:

This procedure provides a step-by-step example of using the X-Ray Spectral Fitting Package (XSPEC) to analyze LAT Gamma-ray Burst observations. It should be noted that, in the early days of the LAT project, XSPEC was used to perform LAT GRB analysis. However, XSPEC was not suitable for performing GBM GRB analysis; hence, the development of rmfit.

Today, researchers tend to use rmfit for both LAT and GBM burst analysis, especially when performing a joint LAT/GBM GRB analysis. However, at the time this was written, XSPEC is still used when running a LAT GRB analysis from a script, which cannot yet be done using rmfit.

Note: LAT GRB data can also be spectrally analyzed using the likelihood tools for source analysis.

The examples used in this exercise assume that you:

  • are using an SCons optimized redhat5-x86_64-64bit-gcc41 build for
    ScienceTools-09-23-01, or later.
  • have set up a directory for your data (e.g., latGRB_analysis) in your User Work Space (and that you will run the science tools from within that directory).

Note: These files can be quite large, and you should not attempt to run them in your home directory.

Run Prerequisite Science Tools

  1. If you have not already done so:
    1. Setup SLAC Central Linux.
      (See Example: Setup (when running Science Tools on SLAC Central Linux.)
    1. Get LAT data using the Astro Server. (Refer to: Extract LAT Data).

    Note: For the purposes of this tutorial, we'll be analyzing GRB 080916C and the burst properties are:

    • Event Sample = P6_V11
    • Energy Range = Min: 100 Max: 300000 MeV
    • Time Range = Min: 243216415 Max: 243217115 (Mission Elapsed Time)
    • Position = RA: 119.88 DEC: -56.59 degrees
    • Radius = 15.0 degrees
    • Event Class = Diffuse
    • Output = FT2 30 second (fits)
    • Event Data = FT1 (fits)
    • FITS-file size limit = Default
    • Debug Mode = False
  1. Run gtselect to perform further selections of the original event file as desired.
    For example:
bash-2.05b$ gtselect
Input FT1 file[latGRB_analysis-ft1.fits]
Output FT1 file[GRB080916C-ft1.fits]
RA for new search center (degrees) (0:360) [180]
119.88
Dec for new search center (degrees) (-90:90) [0]
-56.59
radius of new search center (degrees) (0:360) [10]
start time (MET in s) (0:) [
243216415]
end time (MET in s) (0:) [
243217115]
lower energy limit (MeV) (0:) [100]
upper energy limit (MeV) (0:) [300000]
maximum zenith angle value (degrees) (0:180) [105]
Done.
bash-2.05b$

Note: Photons are selected from:

  • A circle of radius 10 degrees around the best burst position
  • A duration of 700 s was selected (centered around 243216765 s)
  • Maximum zenith angle 1050 .
  1. Run gtbin to bin the photon data into spectra that XSPEC can analyze.
bash-2.05b$ gtbin
This is gtbin version ScienceTools-09-23-01
Type of output file <CCUBE|CMAP|LC|PHA1|PHA2> [PHA1] : 
Event data file name [GRB080104A_spec_ft1.fits] : GRB080916C-ft1.fits
Output file name [GRB080104A.pha] : GRB080916C.pha
Spacecraft data file name [FT2.fits] : latGRB_analysis-ft2-30s.fits
Algorithm for defining energy bins <FILE|LIN|LOG> [LOG] : 
Start value for first energy bin in MeV [100] : 
Stop value for last energy bin in MeV [300000] : 
Number of logarithmically uniform energy bins [60] : 
bash-2.05b$ 

Notes:

  • The choice of pha1 for 'Type of output file' indicates that you want to create a single PHA file — the standard FITS file with binned spectra — spanning the entire time range.
  • The input file created by gtselect is GRB080916C-ft1.fits. The output file is GRB080916C.pha; the extension .pha indicates that this is a standard PHA file. The spacecraft data file is called latGRB_analysis-ft2-30s.fits.
  • LAT photon energies are not quantized and therefore you can choose the desired channel bins.

Here a logarithmic grid has been chosen with 60 bins between a start energy of 100 MeV and stop energy of 300,000 MeV.

  1. Run gtrspgen to create a Detector Response Matrix (DRM), created as a single RSP file (i.e., the DRM is not split into separate RMF and ARF files).
bash-2.05b$ gtrspgen
This is gtrspgen version ScienceTools-09-23-01
Response calculation method (GRB, PS) <GRB|PS> [GRB] : 
Spectrum file name [GRB080916C.pha] : 
Spacecraft data file name [latGRB_analysis-ft2-30s.fits] : 
Output file name [GRB080916C.rsp] : 
Time of GRB (s) [243216415] : 
Response function to use, Handoff|DC2|DC2A|DC2FA|DC2BA|DC2FB etc [P6_V11_DIFFUSE] : 
Algorithm for defining true energy bins <FILE|LIN|LOG> [LOG] : 
Start value for first energy bin in MeV [100] : 
Stop value for last energy bin in MeV [300000] : 
Number of logarithmically uniform energy bins [60] : 
bash-2.05b$
   

Notes:

  • We assume that the instrument response changes as a result of the LAT's pointing on timescales longer than the burst duration.

    This assumption is indicated by the choice of 'GRB' for 'Response calculation method' if our photons were selected over '600s' because gtselect will not currently select photons over short durations. However, most of the photons are in the first ~6 s, justifying the 'GRB' choice.
  • The input file is GRB080916C.pha, the PHA file we created with gtbin.

    The output file is GRB080916C.rsp (the .rsp extension indicates that this is a standard RSP file).
  • gtrspgen reads the location of the burst and the size of the extraction region from the PHA file. However, you must input the time at which the DRM is to be calculated
  • In gtrspgen you choose the incident photon energy ('true energy') bins. gtrspgen reads the apparent photon channel energy grid from the PHA file. The DRM created by gtrspgen is the mapping from the incident photon energy bins into the apparent photon channels. These incident photon energy bins need not be the same as the channels:
    • If there are only a few channels, the calculation of the expected number of photons in each channel will be more accurate if there are more incident photon energy bins.
    • You might want to include some incident photon energy bins above and below the range of channels to account for the LAT's finite energy resolution. Incident energy bins above the highest channel energy is particularly important if some of the photon's energy leaks out of the detector.
  1. You are now ready to Run XSPEC: Part 1.

Last updated by: Chuck Patterson 05/04/2011