NAME

fbbft2pha -- Converts BATSE BFITS file to spectral PHA file


USAGE

        fbbft2pha bftfile phafile

DESCRIPTION

This utility converts a BATSE BFITS file into a PHA ("Pulse Height Analyzer") spectral file that is compatible with the XSPEC spectral analysis package.

The output PHA files conform to the so-called OGIP Type II multispectral PHA file format. For a description of this format, see Arnaud et al., "The OGIP Spectral File Format," in Legacy, No. 2, pp. 65-76, November 1992.

This is an outline of the output BATSE PHA FITS file format:

         Primary Array:  Null data array
     
         Extension # 1:  BINTABLE  'SPECTRUM'
                         Col    TTYPE       TFORM    TUNIT
                         ^^^    ^^^^^^^^    ^^^^^    ^^^^^^^^
                           1    SPEC_NUM    1I       none
                           2    CHANNEL     nI       chan
                           3    TSTART      1E       s
                           4    TSTOP       1E       s
                           5    RATE        nE       count /s
                           6    STAT_ERR    nE       count /s
                         where n is number of spectral channels

Conventionally, PHA files are intended for use with corresponding Redistribution Matrix Files (RMF) generated from the associated BATSE Detector Response Matrices (DRM) by the FTOOL fbdrm2rmf. The corresponding RMF is assumed to have the same name as the PHA file, but with a matching-case extension, .rmf or .RMF. The expected name of the RMF file appears in the PHA keyword RESPFILE.

For data types that are summed over multiple detectors, such as MER, the DETNAM keyword in the output PHA file shows all the used detector numbers concatenated together in the sub-instrument identifier label.


PARAMETERS

bftfile [file name]
Name of input BATSE BFITS file to be converted

phafile [file name]
Name of output BATSE PHA file to be created


EXAMPLES

1. Convert BATSE MER BFITS file to PHA format suitable for XSPEC:

     
          % fbbft2pha mer_bfits_143.fits mer_143.pha


BUGS


SEE ALSO

fbdrm2rmf

CATEGORY

Jun95 ftools.gro