next up previous contents
Next: Manipulating Spectra Up: Reading Spectra Previous: OGIP Spectral Files: .pha   Contents

Using ASCII text files

Profit can also read a simple text file which lists the energy and counts in a spectrum. In this case, some basic formatting is necessary for profit to understand the file. The first line of the file must be:
FORMAT = profit
and the second line should be
TTYPE = E_MIN E_MAX COUNTS
if the file has three columns of data, listing both the minimum and maximum energies of each bin. Alternatively, this line should read
TTYPE = E_MIN COUNTS
if the data lists only the central energy and counts in each spectrum. At the moment, profit assumes the errors are Poissonian; we expect to include a facility for including errors in a future release.

Some additional ``keywords'' can be included, which profit will read and put into the Spectrum Information Window. For example, the following lines added at the beginning of a text file:

EXPOSURE=3600
DATE-OBS=2005-04-01T02:21:38
INSTRUMENT=B21LAB
GRATING=BRAGG
OBJECT=Run10583
! Note: Neon and Iron plasma run with T = 0.7 keV, n = 1e13 cm-3
will make profit list the exposure as 3600 seconds, the observation date as listed, the detector to be B21LAB:BRAGG, and the source name to be Run10583. Finally, comments can be included in the file if they are prefaced with an exclamation mark (!).


next up previous contents
Next: Manipulating Spectra Up: Reading Spectra Previous: OGIP Spectral Files: .pha   Contents
Randall Smith 2005-12-19