NAME

batdph2pha - (OBSOLETE) read in a BAT Detector Plane Histogram and output a file containing a spectrum for each detector.

USAGE

batdph2pha infile outfile rows

DESCRIPTION

NOTE: This task is not supported for scientific analysis. Please use the 'batbinevt' task to convert a survey DPH to a spectrum.

This code reads in a BAT Detector Plane Histogram (DPH), which is organized as a single three-dimensional binary table with spectral information for each BAT detector arranged by geometric location in the focal plane. The tool reorganizes the DPH by detector, outputting a table containing one row for each detector, where each row contains the detector identification and a spectrum with the same number of energy channels as the original DPH.

PARAMETERS

infile [filename]
Input file name. There is no need to include the extension name of the HDU since batdph2pha only operates on an HDU with name "BAT_DPH." The tool assumes that there is also and "EBOUNDS" extension in the input file.

outfile [filename]
Name of the output file. The output file is similar in form to a spectral file, but each row contains a spectrum for an individual detector, not for a particular interval of time. The spectra are contained in the "COUNT" column as vectors with as many elements as there are energy bins in the input DPH. The "EBOUNDS" from the input file is copied to the output file.

row [integer]
The row number in the input DPH which is used to produce the output spectra. The tool only allows one row number to be specified. If the user desires a spectra for the summation of multiple DPH's, then he must add them together using the batsumdph tool and then use batdph2pha.

(clobber = "YES") [string]
If the output file already exists, then setting "clobber = yes" will cause it to be overwritten.

(chatter = 1) [integer, 0 - 5]
Controls the amount of informative text written to standard output. Setting chatter = 4 or higher will produce detailed diagnostic output; chatter = 1 prints out a basic diagnostic message. The default is to produce a brief summary on output.

(history = YES) [boolean]
If history = YES, then a set of HISTORY keywords will be written to the header of the specified HDU in the output file to record the value of all the bateconvert task parameters that were used to produce the output file.

EXAMPLES

Note that when commands are issued on the Unix command line, strings containing special characters such as '[' or ']' must be enclosed in single or double quotes.

The following examples illustrate ways in which batdph2pha can be used.

1. Produce a spectral file from the third row in a DPH file.

         batdph2pha infile='input.dph' outfile='output.spectrum' row=3
    -or- batdph2pha input.dph output.spectrum 3

SEE ALSO

batsumdph

LAST MODIFIED

Nov 2006