Skip banner and navigation tools.

 |  site map

Skip sidebars of related page links.

Creating a spectrum and response matrix

BAT spectra can be extracted for the full event-list, or over a specified time by using the additional parameters tstart and tstop on the command line. These times must be in Swift MET (seconds since 2001-01-01). The time of the beginning/end of the dataset can be determined from the event-list by using fkeyprint:

> fkeyprint sw00377487000bevshsp_uf.evt+0 tst


# FILE: sw00377487000bevshsp_uf.evt
# KEYNAME: TST

# EXTENSION:    0
TSTART  =           281296394. / Start time
TSTOP   =       281381107.0579 / Stop time

In the example below, we extract a spectrum for the T90 interval, determined from battblocks dur.gti file.

>batbinevt detmask=grb.mask tstart=281296751.488 tstop=281296755.584
>Input event file name: sw00377487000bevshsp_uf.evt
>Output file name: grb.pha
>Make light-curve or spectrum: pha
>Histogram time bin size: 0
>Time binning algorithm: u
>Energy bin list: CALDB:80

The standard BAT 80 channels have been used here (CALDB:80). Note that the spectrum produced does not need to go through the grppha ftool; this last step has binned the file.

A systematic error vector must be applied to the BAT spectra before use to account for residuals in the response matrix; there is a specific task to do this, called batphasyserr. This requires the name of the spectrum and the systematic error file name, which can be given as CALDB (capitals required).

In order to ensure that the position of the burst in instrument coordinates is known (since the spacecraft slews, this can change, but the knowledge is required for the flux determination), the ray-tracing keywords must be correct. After the spectrum has been produced, batupdatephakw will perform this task, providing the sw[obsid]bevtr.fits ray-tracing file is present; it should be in the [obsid]/bat/event directory. If this file is missing (possibly the case for data before late 2005), then batmaskwtevt needs to be run to produce one: include auxfile=sw[obsid]bevtr.fits on the batmaskwtevt command line to output the ray-tracing results to a file.

In order to fit the BAT spectrum, a detector response matrix needs to be built.

>batdrmgen
>Input event PHA file name: grb.pha
>Output response matrix file name: grb.rsp

The BAT team recommend fitting the spectra between 15-150 keV, since the BAT mask becomes transparent around 150 keV. Data below 14 keV and above 195 keV should definitely be ignored.

Index