30.01.2013 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5.3. ENERGY CALIBRATION OF EVENTS 31<br />

<strong>The</strong> SDC should be producing a gain/offset file for every observation. If it is not present, then<br />

you must locate the nearest one in time in the trend data in the archive. (see the Swift FTP site<br />

in /swift/data/trend/YYYY MM/bat/bgainoffs).<br />

In this case, let us recompute the energy scale for GRB 050713A (obsid 00145675 000) using<br />

the original event file.<br />

5.3.3 Initial Steps<br />

Change directories to the location of the event data.<br />

cd 00145675000/bat/event<br />

If the event file is compressed, unzip it. <strong>The</strong> energy calibration task modifies the event file in<br />

place, and gzipped files cannot be modified.<br />

gunzip sw*.evt.gz<br />

5.3.4 Compute Energy Calibration for <strong>BAT</strong> Events<br />

<strong>The</strong> energy calibration task for events is called ‘bateconvert’. Here is an example run,<br />

bateconvert infile=sw00145675000bevshsp_uf.evt \<br />

calfile=../hk/sw00145675000bcbo01deg00ab.fits.gz \<br />

residfile=CALDB pulserfile=CALDB fltpulserfile=CALDB \<br />

outfile=NONE calmode=INDEF<br />

• infile is the event file to be calibrated<br />

• calfile is the <strong>BAT</strong> gain/offset file<br />

• residfile, pulserfile and fltpulserfile are ground-derived calibration files that contain the <strong>BAT</strong><br />

energy-to-channel conversion<br />

• outfile=NONE indicates that the operation should be done on the file in-place<br />

• calmode=INDEF means to use the default calibration method<br />

5.3.5 What to do if no gain/offset map is present<br />

Gain/offset maps are produced by the <strong>BAT</strong> flight software periodically to record the pulse height<br />

scale of the electronics. While the <strong>BAT</strong> electronics appear to be quite stable, these regular calibration<br />

activities are intended to account for any systematic changes over time. Gain/offset maps<br />

are used to compute calibrated event energies from raw pulse heights during ground processing, as<br />

shown above.<br />

It is important to understand that the calibration activities are not synchronized with the<br />

observing plan. <strong>The</strong> gain/offset map may have been produced during a previous observation.<br />

Normally the SDC retrieves the proper gain/offset map for GRB data and includes it with the<br />

data set. If there are processing errors, or for non-GRB observations, the gain/offset maps may be<br />

missing. If that is the case, the gain/offset map must be found manually from the trend data.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!