next up previous contents
Next: Converting data files from Chandra Up: Input Previous: Input   Contents


The spectrum

The purpose of the program is to analyze a user-supplied spectrum. The spectrum must be provided as an ASCII text file containing six, five, three, or two columns of float or integer numbers.

If there are five columns, these will be interpreted as follows: the first column contains wavelength values, the second lists the corresponding count values, and the third column contains the errors for the count values. The next two columns must contain the corresponding count values of the instrumental background with their errors. If errors are not measured explicitly, Poisson errors may be included, i.e., the square root of the count values. Errors given in the data file are only used for plotting error bars. The fitting routine will always use Poisson errors implicitly without using the given errors.
An extra column may be added giving the effective areas on the same wavelength grid in cm2. These are not used by the C-Version but are very useful for plotting in the IDL version.

Any number of trailing comments may be given, starting with a #. The first line may contain the exposure time (in seconds, also starting with #). By default, the program will expect the spectrum in a file named spectrum.dat (in the current working directory).

Data files with two or three columns (supported in cora 2.0 and later) are interpreted as follows: The first two columns are always the wavelengths and counts. The instrumental background can be given in a third column. I.e., if the data file contains only three columns, the last column will be considered the instrumental background, instead of the count errors, which in turn are considered Poissonian, i.e., $\sqrt{cts}$. When only two columns are given, the instrumental background will be considered zero in all bins.

Test data: the program cora_spec [-l nlines] [-a amp] [-c continuum] [-s sigma] creates a synthetic example spectrum in the desired format with nlines lines, amplitude amp, continuum background continuum, and line width sigma, stored in a file spectrum.dat.


next up previous contents
Next: Converting data files from Chandra Up: Input Previous: Input   Contents
Jan-Uwe Ness
2003-05-23