.help fbbft2pha Jun95 ftools.gro
.ih
NAME
fbbft2pha -- Converts BATSE BFITS file to spectral PHA file
.ih
USAGE
fbbft2pha bftfile phafile
.ih
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.
.sp
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.
.sp
This is an outline of the output BATSE PHA FITS file format:
.sp
.nf
    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
.fi
.sp
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.
.sp
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.
.ih
PARAMETERS
.ls bftfile  [file name]
Name of input BATSE BFITS file to be converted
.le 
.ls phafile  [file name]
Name of output BATSE PHA file to be created
.le
.ih
EXAMPLES
1. Convert BATSE MER BFITS file to PHA format suitable for XSPEC:
.nf

     % fbbft2pha mer_bfits_143.fits mer_143.pha
.fi
.ih
BUGS
.ih
SEE ALSO
fbdrm2rmf
.endhelp
