2. XSPEC: Part 1

1. LAT GRB Analysis

2. XSPEC: Part 1

3. XSPEC: Part 2

Also see:

Note: No background file is necessary to perform a spectrum analysis of a Gamma-ray burst; only a PHA file with the spectrum and an RSP file with the DRM are required. It is expected that all non-burst sources will produce less than 1 photon in the extraction region during the burst. The following details only the simplest example of fitting a spectrum with XSPEC; for further details, consult the XSPEC manual.

Prerequisites

You must have the two files necessary to analyze the burst spectrum with XSPEC:

  • A PHA file with the spectrum (e.g., GRB080916C.pha)
  • An RSP file with the DRM (e.g., GRB080916C.rsp)

Procedure

  1. To start XSPEC, enter:

    xspec

Note: If you are running on a Windows machine, use
X-Win32
as your X server.

Tip: To see a summary of xspec commands at any time,
enter:

    help
    ?

  1. Load in the data:
XSPEC12>data GRB080916C.pha
  1. Load in the DRM:
XSPEC12>response GRB080916C.rsp
  1. Load in a power law model
XSPEC12>model powerlaw
  1. Choose the parameters' initial values.

Note: Power law indices tend to be near 2 for gamma-ray sources; in this tutorial, the default values were used.

  1. Fit the data:
XSPEC12>fit

    Tip: When queried "Number of trials exceeded: continue fitting?", hit the enter key until the fit has completed. (See Example: XSPEC Fit.)

  1. Change plotting device (e.g., pgplot X-Window server /xw):
XSPEC12>cpd /xw
  1. To look at the fit using energy as the x-axis, enter:
XSPEC12>setplot energy
XSPEC12>plot ldata 

The following plot will be displayed. (Note: If you're running on a Windows machine, be sure you're using an X-Win32 terminal window.)

Note: You may be prompted for the lower and upper energy boundaries; these are provided in units of kev. Issues to consider are:

  • The number of photons in the spectrum.
  • The number of counts per bin (and therefore the number of bins).
  • The energy range that should be fit.
  • The fitting statistic
  1. To perform rebinning, additional fits, and view additional plots, etc.; continue this session and refer to Run XSPEC: Part 2.

Last updated by: Chuck Patterson 05/04/2011