batphasyserr - apply BAT spectral systematic error vector


batphasyserr infile syserrfile


batphasyserr adds the BAT systematic error vector to a BAT spectral file. The systematic error vector contains an estimate of the fractional systematic error in each BAT spectral channel. Normally this information comes from the BAT calibration database (CALDB).

The task handles the differences between type I and type II spectral files transparently. It also resamples the systematic error template to the energy bin edges of the input spectrum (this is done by pure averaging).


infile [filename]
Input/output spectral file. The file should be an OGIP-standard type I or type II spectral file. The DATE-OBS keyword is used to query the CALDB. The file is modified in place. If necessary, the SYS_ERR column is created, and the SYS_ERR keyword is deleted.

syserrfile [filename]
Name of the systematic error vector file to use. Normally this should be set to "CALDB" so that the current best estimate of the BAT spectral systematic error is used for the date of the given infile.

(chatter = 2) [integer, 0 - 5]
Controls the amount of informative text written to standard output.


1. Create the SYS_ERR column in a spectral file named myspectrum.pha.

        batphasyserr myspectrum.pha CALDB
The systematic error vector is retrieved from the calibration database.




Aug 2007