.help bod2pha May2004 ftools.gro
.ih
NAME
bod2pha -- Makes XSPEC compatible PHA file from BATSE Earth occultation data.
.ih
USAGE
bod2pha datadir outputdir bodfil viewper tjdsta tjdstp minfds srcnam phastr clobber
.ih
DESCRIPTION
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: <http://cossc.gsfc.nasa.gov/timeline/index.html>, 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.
.sp
The BATSE Earth occultation database, and  related information  are availble through the HEASARC, or on the  web   at: <ftp://cossc.gsfc.nasa.gov/compton/data/batse/occultation>; also see <http://cossc.gsfc.nasa.gov/batse/index.html>  and <ftp://cossc.gsfc.nasa.gov/compton/data/batse/misc>. For a complete description of the methodology, refer to the BATSE Earth Occultation Catalog paper, Harmon, et al 2004 ApJ Sup (astro-ph/0404453).
.ih
PARAMETERS
.ls datadir [string]
name of directory containing BATSE data occultation file and viewing period list file
.le
.ls outputdir [string]
name of directory for output files
.le
.ls bodfil [string]
name of BATSE occultation data FITS file (NHIS type)
.le
.ls viewper [integer]
viewing period number - user enters either this value or the tjdsta/tjdstp pair
.le
.ls tjdsta [real]
desired start time (Truncated Julian Date)
.le
.ls tjdstp [real]
desired stop time (Truncated Julian Date)
.le
.ls minfds [integer]
minimum number of flux determinations by a BATSE detector for inclusion in summation
.le
.ls srcnam [string]
name of source for which BATSE occultation data FITS file was created
.le
.ls phastr [string]
optional string to help name PHA output files
.le
.ls clobber [integer]
indicates whether or not to overwrite the existing output files
.ih
EXAMPLES
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.
.sp
.nf
bod2pha bodfil=crab_8521-8700_nhis viewper=0135 minfds=4 
phastr=Crab_VP315
.fi
.sp
.ih
FILES NEEDED
.sp
BATSE Earth occultation flux history files, found at <ftp://cossc.gsfc.nasa.gov/compton/data/batse/occultation>, 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 <ftp://cossc.gsfc.nasa.gov/compton/>. 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.
.ih
BUGS
.ih
SEE ALSO
bodgetvp, bod2rmf, bodfluxhis, groview
.endhelp
