The SWIFT BAT Software Guide Version 6.3 30 ... - HEASARC - Nasa
The SWIFT BAT Software Guide Version 6.3 30 ... - HEASARC - Nasa
The SWIFT BAT Software Guide Version 6.3 30 ... - HEASARC - Nasa
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
D.5. <strong>BAT</strong>DRMGEN 125<br />
D.5 <strong>BAT</strong>DRMGEN<br />
D.5.1 NAME<br />
batdrmgen - computes <strong>BAT</strong> detector response matrix (RSP) for a known source position<br />
D.5.2 USAGE<br />
batdrmgen infile outfile hkfile<br />
D.5.3 DESCRIPTION<br />
batdrmgen is the <strong>BAT</strong> Detector Response Matrix (DRM) generator tool that computes the full<br />
<strong>BAT</strong> instrument response to incident photons, given the source position information read from an<br />
input PHA spectral file. <strong>The</strong> output FITS file contains a matrix that represents the mean response<br />
of a detector using mask-weighted analysis. Because <strong>BAT</strong> is very wide-field, it is not practical to<br />
separate the response into “ARF” and “RMF” components, and for this reason batdrmgen creates<br />
a single response with these components combined (so-called “RSP”). This file should be used in<br />
spectral analysis with software like XSPEC.<br />
<strong>The</strong> batdrmgen tool accepts as input a pulse height spectrum file produced by the <strong>BAT</strong> binning<br />
tool ‘batbinevt’. <strong>BAT</strong> spectra are required to have both a SPECTRUM extension and an<br />
EBOUNDS extension, which describes the energy bin edges used to produce it.<br />
<strong>BAT</strong> spectra are required to have specific keywords which describe the position of the source in<br />
the field of view. Please note that, as documented in the <strong>BAT</strong> software manual, users must run<br />
the tasks ‘batupdatephakw’ and ‘batphasyserr’ on their spectra before running batdrmgen. <strong>The</strong>se<br />
other tasks apply several instrument-related corrections which must be in place before the response<br />
matrix is computed.<br />
<strong>The</strong> batdrmgen tool accepts both “Type I” and “Type II” spectral files. <strong>The</strong> most common<br />
type of file, Type I files contain a single spectrum (and are produced using the outtype=PHA1<br />
option of batbinevt). Type II files contain multiple spectra in a single extension (and are produced<br />
using the outtype=PHA2 option of batbinevt). <strong>The</strong> ‘row’ option of batdrmgen allows the user to<br />
select which Type II spectrum to process.<br />
Upon finishing, batdrmgen attempts to modify the input spectrum to record the file name of<br />
the newly created response matrix. By default, it uses the standard RESPFILE keyword for this<br />
purpose, but if a column named RESPFILE is present, it will use the column (and specified row)<br />
instead. This column behavior is useful for Type II spectra, but note that such a column must<br />
exist before calling batdrmgen, otherwise it falls back to using the keyword approach. <strong>The</strong> spectral<br />
fitting package XSPEC will use either the RESPFILE column or keyword to automatically load<br />
the response matrix.