add_pha - Add counts in ``PHA'' files.

 

Overview

add_pha is a program for summing the counts columns from multiple spectrum (``PHA'') files. Input files may be of OGIP Type I (single spectrum, column oriented), or Type II (multiple spectra, row oriented). Output spectra are written to Type I files. The EXPOSURE keyword in the output header is the mean over all input exposures. The BACKSCAL keyword is the exposure-weighted sum over the input files' backscale values. This ensures that the product is compatible with the output header of dmarfadd, and that source and background spectral files each summed with add_pha are consistent.

WE REPEAT: The EXPOSURE is the MEAN. dmarfadd produces the exposure-weighted ARF SUM. This is potentially confusing if you are expecting a cumulative exposure time, but it is a single consistent definition which serves for both adding orders and adding observations. See this technical note for the mathematical definitions.

add_pha will sum any COUNTS columns which have identical grids. It is up to the user to determine whether it is appropriate to sum spectra. The primary concern is that the spectral redistribution fuctions (defined in a response matrix, or RMF) are identical, or similar enough for the data quality and intended analysis.

add_pha is written in S-Lang as an ISIS-script. It optionally uses the CIAO paramio interface via a S-Lang module, if the CIAO enviroment is defined (specifically, the variable ASCDS_INSTALL). Otherwise, it assumes positional command-line arguments. add_pha will run with stand-alone ISIS, with CIAO 3.3 (and bundled isis), or in the CIAO-4, (but using the ciaorun script wrapper) and is compatible with S-Lang versions 1 and 2.

The input files can be specified with the cfitsio extended file syntax, especially the row-filtering, which is particularly useful in accessing the plus and minus grating orders in a single PHA Type II file. This is true even for the CIAO paramio interface (CIAO data-model syntax will not work!).

No provisions are made for altering the grouping of the bins, nor for associating counts with responses by setting header keywords. Such can be done with other tools or during analysis sessions.


This page was last updated Jan 17, 2010 by David P. Huenemoerder. To comment on it or the material presented here, send email to dph@space.mit.edu.
Valid HTML 4.01! Made with JED. Viewable With Any Browser.