bod2pha -- Makes XSPEC compatible PHA file from BATSE Earth occultation data.


        bod2pha datadir outputdir bodfil viewper tjdsta tjdstp minfds srcnam phastr clobber


This utility extracts spectral data from a BATSE Earth-occultation FITS file (NHIS type), forms a summed spectrum and writes the output into PHA FITS (i.e. XSPEC) files. A time interval in Truncated Julian Date (TJD == JD-2440000.5) can be specified, advisably within a CGRO viewing period. Alternatively, a CGRO viewing Period number can be provided; if this input option is used it overrides the TJD start/stop fields. The CGRO Viewing Plans (or observation Timelines) are available on the web site: <>, or view the FITS file $LHEA_DATA/vplist.fits. Another FTOOL, "groview", can proide useful information on the orientation of the observatory, and the relative illumination of the individual BATSE Large Area Detector modules (LADs) as a function of time for a given celstial source position. Note that each BATSE occultation data FITS file corresponds to a single astronomical source on the sky. The name of each output PHA file defaults to a string containing the start and stop Truncated Julian Dates, and the BATSE LAD ID (ranging from 0 through 7). An optional string may be entered to allow shorter output file names. One output file is generated for each detector with at least the specified minimum number of flux determinations for the source. The related tool, "bod2rmf" is needed to create the associated instrument response matrices.

The BATSE Earth occultation database, and related information are availble through the HEASARC, or on the web at: <>; also see <> and <>. For a complete description of the methodology, refer to the BATSE Earth Occultation Catalog paper, Harmon, et al 2004 ApJ Sup (astro-ph/0404453).


datadir [string]
name of directory containing BATSE data occultation file and viewing period list file

outputdir [string]
name of directory for output files

bodfil [string]
name of BATSE occultation data FITS file (NHIS type)

viewper [integer]
viewing period number - user enters either this value or the tjdsta/tjdstp pair

tjdsta [real]
desired start time (Truncated Julian Date)

tjdstp [real]
desired stop time (Truncated Julian Date)

minfds [integer]
minimum number of flux determinations by a BATSE detector for inclusion in summation

srcnam [string]
name of source for which BATSE occultation data FITS file was created

phastr [string]
optional string to help name PHA output files

clobber [integer]
indicates whether or not to overwrite the existing output files


1. Create a PHA spectral data files for the Crab, for CGRO Viewing Period 13.5.The output file root name is specfied to be "Crab_VP315". A minimum of 4 flux determintations are required for an individual LAD to be included in the analysis.

          bod2pha bodfil=crab_8521-8700_nhis viewper=0135 minfds=4 


BATSE Earth occultation flux history files, found at <>, then placed in "data_dir", e.g. data_dir/crab_10150-10399_nhis.fits. The Viewing Period list file "vp_list.fits" is also required if the time boundaries are to be entered in terms of viewing period number. By default, this file resides in the $LHEA_DATA directory, and is obtained by bod2pha transparently. Otherwise, obtain a copy from <>. This should also then be placed in data_dir/vp_list.fits. Other files, such as batse_obs_plan.fits, which contains additional details regarding the CGRO pointing history, can be obtained there as well.



bodgetvp, bod2rmf, bodfluxhis, groview


May2004 ftools.gro