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.

1<strong>30</strong> APPENDIX D. <strong>BAT</strong> SOFTWARE TOOL REFERENCE<br />

D.6 <strong>BAT</strong>ECONVERT<br />

D.6.1 NAME<br />

bateconvert - read in an event file and apply energy conversions.<br />

D.6.2 USAGE<br />

bateconvert infile calfile residfile pulserfile [outfile] [calmode] [zeroit]<br />

D.<strong>6.3</strong> DESCRIPTION<br />

This task reads in an event file and one to three calibration files containing gains and offsets in<br />

a <strong>BAT</strong> Detector Plane array. For each event it calculates the energy in keV from the ADU value<br />

(PHA), gain and offset. <strong>The</strong> tool fills the PI and ENERGY columns in the event FITS file. PI is<br />

the same as energy, but expressed in units of 0.1 keV. If the event file does not have a PI column,<br />

then such a column is added to the file.<br />

<strong>The</strong> default is to fill in or create the PI column in the input file, but if the optional “outfile”<br />

argument is given, a new file with the PI column filled is created.<br />

D.6.4 PARAMETERS<br />

infile [filename ]<br />

Input file name. <strong>The</strong>re is no need to include the extension name of the HDU since bateconvert<br />

only operates on an HDU with name “EVENTS.” Unless an outfile name is specified,<br />

bateconvert will automatically fill in the PI column in the infile and/or create a PI column if<br />

none exists.<br />

calfile [filename ]<br />

Name of the calibration file. This is a required parameter. This file is expected to contain the<br />

gain and offset derived in flight. This file is used for both LINEAR and QUADRATIC energy<br />

conversion. <strong>The</strong> file must exist and must include a “<strong>BAT</strong> MAP” extension with “GAIN” and<br />

“OFFSET,” columns containing calibration parameters in the proper format. If zeroit==YES<br />

then the calfile need not exist and calfile can be set to NONE (or left off the command line).<br />

residfile [filename ]<br />

Name of the file containing the residuals between a quadratic pulser gain fitting and a linear<br />

fitting. This is a required parameter. This file is typically derived from ground processing.<br />

This file is used for all but the LINEAR energy conversion. <strong>The</strong> file must exist and must<br />

include a “<strong>BAT</strong> MAP” extension with “GAIN2”, “GAIN,” “OFFSET” columns containing<br />

calibration parameters in the proper format and had the appropriate value of the GAINMETH<br />

keyword. If calmodes CUBIC, DIRECTCUBIC, or FIXEDDAC are used, the file must also<br />

have a GAIN3 column. If DIRECTCUBIC or FIXEDDAC are used, the file must have

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

Saved successfully!

Ooh no, something went wrong!