This section provides the information needed to obtain the GBM data as well as a step-by-step example of extracting and modeling a GBM Gamma-Ray Burst observation and fitting the data using the X-Ray Spectral Fitting Package (Xspec).
It is assumed that:
Note: For the purposes of this thread, the relevant burst properties are:
The GBM consists of 12 NaI detectors (8 keV to ~900 keV) and 2 BGO detectors (200 keV to ~40 MeV). Each detector views a different portion of the sky so that, for a particular burst, there will be varying amounts of signal in the different detectors. The data can be obtained from the HEASARC BROWSE GBM Burst Catalog (the column explanation can be retrieved at the help file page). There are multiple ways of easily locating a particular burst based solely on its name; e.g., for GRB080916C, we can:
After obtaining the search results, click on "D" next to the burst in question (GRB080916009) for the data products. The Quicklook Plot is a set of light curves for all 12 NaI detectors.
The GBM burst data include files for all detectors, whether or not they were oriented to accumulate many counts from a burst. As a rule of thumb, we want to use the 2 or 3 NaI detectors with the brightest signals (the NaI detectors that triggered should have accumulated the most burst counts, although if FERMI slews to point towards a long burst, other detectors will record significant burst flux). More detectors can be used, but for the most part, they will not increase the significance of the fits.
For this burst, we will choose NaI0 (which triggered), NaI3, and NaI4. Because we have chosen detectors between 0 and 5, we also select BGO0. If we had chosen NaI detectors 6-11, we would use BGO1. If both low- and high-numbered NaI are being used, then select both BGO detectors. More specific lightcurves can be found in the quicklook products directory.
In the page where the above set of light curves is located, you can select the "GBM Trigger Products (current)" directory to retrieve the full data for the all the detectors. They are sometimes updated to newer versions, indicated by the v0# numbers at the end of the file name (the version numbers are unimportant, and do not need to be consistent across the different files). The files for the NaI and BGO detectors are labelled differently: The corresponding files for the NaI detectors have n# (n0 to n9, na, or nb, with the last two corresponding to detectors #10 and #11) while for the BGO detectors BGO have b0 or b1. The naming convention for the GBM files can be found in the GBM Data Products page and in the Cicerone (See Data - GBM Data Products).
Instead of checking the above set of light curves, another way to select the triggered detector is from the burst data files. For example, look for the 'DET_MASK' keyword in the primary header of the file that begins "glg_trigdat" (use the FTOOLS fkeyprint to display the content of the keyword). This keyword provides a string that indicates which detectors triggered: the label "1" or "0" denotes if the NaI detector were triggered or not. Therefore, the string '000110000000' for 080916C means that NaI detectors 3 and 4 only were actually triggered.
For GRB080916C, the relevant files for the NaI detectors are:
TTE files only cover ~300 s of data around the trigger time, and take longer to process. CSPEC files cover a longer time interval, and are good for longer events where the TTE files might not be sufficient for background fitting. The GBM team will update files as better data products become available. For example, response files may be updated as better burst positions become available (e.g., because Swift or the IPN provide a more accurate position that the GBM position).
In this tutorial, we will be analyzing the TTE data for NaI0. We will need the .fit file and the .rsp file, as well as the header file "glg_tcat_all_bn080916009_v02.fit".
The TTE file contains information for each individual photon. We use gtbin to create a lightcurve:
prompt> gtbin
This is gtbin version ScienceTools-v9r23p1-fssc-20111006
Type of output file (CCUBE|CMAP|LC|PHA1|PHA2) [PHA2] LC
Event data file name[] glg_tte_n0_bn080916009_v01.fit
Output file name[] glg_tte_n0_bn080916009_v01.lc
Spacecraft data file name[NONE]
Algorithm for defining time bins (FILE|LIN|SNR) [LIN]
Start value for first time bin in MET[] 243216746
Stop value for last time bin in MET[] 243217066
Width of linearly uniform time bins in MET[] 0.25
Notes:
Next we plot the lightcurve in fv, shifted so that the trigger time is at t=0:
Select the "PLOT" option for the "RATE" extension of the .lc file; plot "TIME-243216766.614" as the x value and "COUNTS" as the y-value. Plotting lightcurves as counts vs FERMI's natural time system (i.e., MET) usually results in an x-axis that is not very informative because of the large difference in scale between burst durations (10's of seconds) and MET. Therefore it is useful to plot lightcurves as counts vs. time relative to the trigger time. a quantity that is provided in the HEASARC BROWSE GBM Burst Catalog, but is also found in the primary header of the GBM burst data files as the keyword 'TRIGTIME'.
The time unit in the FERMI data files is Mission Elapsed Time (MET), the number of seconds since midnight January 1, 2001 (UTC), as is described in the Cicerone. (See Data - Time in FERMI Data Analysis.). The xTime Date/Time Conversion Utility converts between FERMI's MET and other time systems.
It looks like the burst lasted for about 70 seconds for this detector; we'll use this as a time cut in order to construct a spectrum. We first create an ascii file defining our time cuts, which we will call "timeBins.txt":
243216736 243216756
243216766 243216836
The first line contains 20s of pre-burst background data, which can be used for spectral analysis; the second line is the approximate MET time range for the burst. Next we run gtbindef:
prompt> gtbindef
This is gtbindef version ScienceTools-v9r23p1-fssc-20111006
Type of bins, E -- energy or T -- time[E] T
File containing the ascii bin definitions[] timeBins.txt
Output file name[] timeBins.fits
We use gtbin to create a PHA2 file (a PHA file which contains an energy spectrum for each time bin), using the file we have just created to define our time bins:
Note: gtbin currently has a bug when making pha2 files; it requires the parameters tstart and tstop to have values set, even though they are not used when time bins are specified in a file. Although the actual values tstart and tstop values should not matter, as long as tstop > tstart, it is recommended to use values well outside the actual time range. You can specify these values on the command line:
prompt> gtbin tstart=243216500 tstop=243217500
This is gtbin version ScienceTools-v9r23p1-fssc-20111006
Type of output file (CCUBE|CMAP|LC|PHA1|PHA2) [LC] PHA2
Event data file name[glg_tte_n0_bn080916009_v01.fit]
Output file name[glg_tte_n0_bn080916009.lc] glg_tte_n0_bn080916009.pha
Spacecraft data file name[NONE]
Algorithm for defining time bins (FILE|LIN|SNR) [LIN] FILE
Name of the file containing the time bin definition[NONE] timeBins.fits
Now this PHA2 spectral file, along with the corresponding response matrix file ("glg_cspec_n0_bn080916009_v07.rsp"), can be analyized with XSPEC.
What follows is a simple analysis of the NaI #0 detector spectrum of GRB080916C using Xspec. For more detailed examples, consult the XSPEC manual.
Note: The default version is now release 12 (XSPEC12).
XSPEC12> data glg_tte_n0_bn080916009.pha{2}
1 spectrum in use
Spectral Data File: glg_tte_n0_bn080916009.pha{2} Spectrum 1
Net count rate (cts/s) for Spectrum:1 1.609e+03 +/- 4.806e+00
Assigned to Data Group 1 and Plot Group 1
Noticed Channels: 1-128
Telescope: GLAST Instrument: GBM Channel Type: PHA
Exposure Time: 69.65 sec
Using fit statistic: chi
No response loaded.
***Warning! One or more spectra are missing responses,
and are not suitable for fit.
Recall that we specified two bins: 1) background, and 2) burst, each with its own energy spectrum. The data come from our second bin, so that we specify 2 in brackets when we load in the data. Because the response matrix was not specified in the header of the spectral file, it has not been automatically loaded and a warning has been printed out. Load in the response matrix:
XSPEC12> resp glg_cspec_n0_bn080916009_v07.rsp
***Warning: No TLMIN keyword value for response matrix FCHAN column.
Will assume TLMIN = 1.
Response successfully loaded.
XSPEC12> back glg_tte_n0_bn080916009.pha{1}
Net count rate (cts/s) for Spectrum:1 3.460e+02 +/- 1.029e+01 (21.5 % total)
Most binned spectra have high and low energy channels, that are beyond the instrument response function's believable energy range, are affected by non-linearities, or are overflow channels (all counts above a certain energy end up in that channel). These channels should not be included in fitting spectra; in XSPEC terminology these channels are 'ignored.' Assuming that the GBM channels run from 1 to 128 the following channels should always be ignored:
These are conservative ranges (i.e., ignoring as few channels as possible) and more realistically it will be necesary to ignore a few additional channels on either end. If you find that the residual (fit minus actual count numbers) for a few channels at either end of the fitted spectrum are particularly large, then these channels are probably affected by systematics and should be ignored.
XSPEC12> ign 1-5,100-**
5 channels (1,5) ignored in spectrum # 1
29 channels (100,128) ignored in spectrum # 1
XSPEC12> mo grb
Input parameter value, delta, min, bot, top, and max values for ...
-1 0.01( 0.01) -10 -3 2 5
1:grbm:alpha>
-2 0.01( 0.02) -10 -5 2 10
2:grbm:beta>
300 10( 3) 10 50 1000 10000
3:grbm:tem>
1 0.01( 0.01) 0 0 1e+24 1e+24
4:grbm:norm>
========================================================================
Model grbm<1> Source No.: 1 Active/On
Model Model Component Parameter Unit Value
par comp
1 1 grbm alpha -1.00000 +/- 0.0
2 1 grbm beta -2.00000 +/- 0.0
3 1 grbm tem keV 300.000 +/- 0.0
4 1 grbm norm 1.00000 +/- 0.0
________________________________________________________________________
Chi-Squared = 3.844704e+06 using 94 PHA bins.
Reduced chi-squared = 42718.93 for 90 degrees of freedom
Null hypothesis probability = 0.000000e+00
Current data and model not fit yet.
XSPEC12> fit
<...skip output...>
========================================================================
Model grbm<1> Source No.: 1 Active/On
Model Model Component Parameter Unit Value
par comp
1 1 grbm alpha -1.00785 +/- 0.132980
2 1 grbm beta -3.06796 +/- 0.843127
3 1 grbm tem keV 416.990 +/- 168.483
4 1 grbm norm 1.77511E-02 +/- 3.97780E-03
________________________________________________________________________
Chi-Squared = 99.91 using 94 PHA bins.
Reduced chi-squared = 1.110 for 90 degrees of freedom
Null hypothesis probability = 2.228741e-01
XSPEC12> cpd /xs
XSPEC12> setplot energy
XSPEC12> plot ldata res
XSPEC12> plot uf res
Notes:
The figure below shows the spectrum obtained for this example.
Additional Notes:
Last updated by: Elizabeth Ferrara 08/07/2012