add_pha - Add counts in ``PHA'' files.
Overviewadd_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.
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.
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.
NOTE: CIAO interfaces are still in the code but will result in an error when run in a CIAO environemnt. CIAO no longer uses S-Lang nor distributes S-Lang modules (such as paramio).
This page was last updated Sep 3, 2013 by David P. Huenemoerder. To comment on it or the material presented here, send email to firstname.lastname@example.org.