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
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
D.12. <strong>BAT</strong>ID2XY 153<br />
D.12 <strong>BAT</strong>ID2XY<br />
D.12.1 NAME<br />
batid2xy - read in the detector number (either block, dm, side, detector numbers or single detector<br />
ID) and output the x/y position in the <strong>BAT</strong> array –OR– input the x/y position in the <strong>BAT</strong> array<br />
and output the detector identification.<br />
D.12.2 USAGE<br />
batid2xy infile [block] [dm] [side] [det] [detid] [detx] [dety] [outfile]<br />
D.12.3 DESCRIPTION<br />
This code can either read in an input FITS file containing a list of detector identifications or x/y<br />
positions, or it can read these values from the command line (with the input file given as NONE).<br />
<strong>The</strong> program calls batidconvert to figure out the X (column) and Y (row) numbers associated<br />
with the particular detector or does the reverse transformation. <strong>The</strong> output is always the full<br />
identification of the detector by DETID Block DM SIDE DET X Y.<br />
<strong>The</strong>re are three basic modes of conversion, which are abbreviated BDSD, DETID and DETXY.<br />
<strong>The</strong> mode is selected either by including a “<strong>BAT</strong>IDMOD” keyword in the input file, or by supplying<br />
valid ( > -1) values of the detid, detx or dety parameters.<br />
BDSD: In this mode, the conversion goes from detector identification to <strong>BAT</strong> X and Y (location<br />
in the detector plane). <strong>The</strong> detector is identified by, respectively, block (0:15), detector<br />
module (0:7), side (0:1), detector (0:127). In the input file, these are supplied in columns named<br />
“BLOCK”,“DM”,“SIDE” and “DET.” <strong>The</strong> keyword “<strong>BAT</strong>IDMOD” is set to “BDSD.” On the<br />
command line, these are supplied through the block, dm, side and det parameters. See example<br />
below.<br />
DETID: In this mode, the conversion goes from detector identification to <strong>BAT</strong> X and Y (location<br />
in the detector plane). <strong>The</strong> detector is identified by detector ID, which is derived from the formula:<br />
detid = block*2048 + dm*256 + side*128 + detector. In the input file, this is supplied in a column<br />
name “DETID.” <strong>The</strong> keyword “<strong>BAT</strong>IDMOD” is set to “DETID.” On the command line, this is<br />
supplied by setting the detid parameter equal to the detector ID. See example below.<br />
DETXY: In this mode, the conversion goes from <strong>BAT</strong> X and Y (location in the detector plane)<br />
to detector identificaiton. <strong>The</strong> detector location is given by <strong>BAT</strong>X and <strong>BAT</strong>Y. In the input file,<br />
these are supplied in columns named “DETX” and “DETY.” <strong>The</strong> keyword “<strong>BAT</strong>IDMOD” is set<br />
to “DETXY.” On the command line, these are supplied through the detx and dety parameters.<br />
See example below.<br />
D.12.4 PARAMETERS<br />
infile [filename ]