batdph2dpi - (OBSOLETE) compress a 3-d image cube in a FITS binary table along the first dimension (the energy dimension) to create a 2-d image.


batdph2dpi infile outfile rows levels


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

This tool "flattens" a BAT detector plane histogram (DPH), which is a data cube with an energy dimension as well as X and Y dimensions, into a BAT detector plane image (DPI), which is a two-dimensional image. A DPI can be used in tools such as batfftimage to make a sky image by deconvolution.

The user must select a single row in the DPH to be flattened since the tool only creates a single image as output. It must be called multiple times to create multiples images, which can then be concatenated.

Using this program the following could be done:

The generation of the output file will fail if the file is too large to fit the available memory.


input [filename]
Input file name without the BAT_DPH extension.

outfile [filename]
Output file name. Precede it with an exclamation point, !, (or \! on the Unix command line), to overwrite a preexisting file with the same name (or set the clobber parameter to YES).

Number of the row (data cube number) of the BAT_DPH extension binary table from which the data are taken for flattening the image.

Ranges of energy levels that are used in the flattening process. Example 1-3,5. Suppose the data cube in the BAT_DPH extension has 10 energy levels and the user inputs the following ranges: 1-3,5-7,9-15 the energy levels used for flattening are 1-3,5-7,9-10. Values greater than 10 are not used. The ranges should not overlap and the second value in a range should be greater than the first value.

(chatter = 1) [integer, 0 - 5]
Controls the amount of informative text written to standard output. Setting chatter = 5 will produce detailed diagnostic output, otherwise this task normally does not write any 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 task parameters that were used to produce the output file.


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 how the program can be executed to compress a data cube.

1. Compress a specified data cube (given by row number) using all the energy levels in the cube and store the new image in the outfilename.

     batdph2dpi infilename outfilename 1 "-"
2. Compress a specified data cube (given by row number) using specified ranges of energy levels.

  batdph2dpi infilename  outfilename 1 "1-3,5"


Nov 2006