fbdrm2rmf -- Converts BATSE DRM file to RMF format
fbdrm2rmf drmfile rmffile
This utility converts a BATSE DRM file into an RMF ("Redistribution Matrix File") that is compatible with the XSPEC spectral analysis package.
The output RMF files conform to the OGIP standard RMF format. For a description of this format, see George et al., "The Calibration Requirements for Spectral Analysis," in Legacy, No. 2, pp. 51-64, November 1992.
This is an outline of the output BATSE RMF FITS file format:
Primary Array: Null data array Extension # 1: BINTABLE 'SPECRESP MATRIX' Col TTYPE TFORM TUNIT ^^^ ^^^^^^^^ ^^^^^^^ ^^^^^ 1 ENERG_LO 1E keV 2 ENERG_HI 1E keV 3 N_GRP 1I none 4 F_CHAN PI(126) chan 5 N_CHAN PI(126) chan 6 MATRIX PE(252) cm**2 Extension # 2: BINTABLE 'EBOUNDS' Col TTYPE TFORM TUNIT ^^^ ^^^^^^^^ ^^^^^^^ ^^^^^ 1 CHANNEL 1I chan 2 E_MIN 1E keV 3 E_MAX 1E keV
Conventionally, RMF files are intended for use with corresponding "Pulse Height Analyzer" (PHA) files generated from the associated BATSE BFITS files by the FTOOL fbbft2pha. The corresponding PHA file is assumed to have the same name as the RMF, but with a matching-case extension, .pha or .PHA. The expected name of the PHA file appears in the RMF keyword PHAFILE.
For data types that include measurements by multiple detectors (MER, e.g.) the DETNAM keyword in the output RMF file shows all the used detector numbers concatenated together in the sub-instrument identifier label. The response matrices are summed over detectors. The input-side photon energy edges (ENERG_LO and ENERG_HI) and the output-side channel energy edges (E_MIN and E_MAX) are averaged over detectors.
1. Convert BATSE discriminator DRM file into RMF suitable for XSPEC:
% fbdrm2rmf discsc_drm_2003.fits discsc_2003.rmf
fbbft2pha