Within the limits of the present section it is enough to know that the relevant energy information for each photon listed in the input Photon Event Table is contained in the column labeled AMPL. The integer values listed in this column are roughly in linear relation to the photon energy (in eV or multiples), and their range depends on the instrument used. If no energy information is available, i.e. when the AMPL column is missing (as in the case of HRI data), the examples given in this section would still work without exception giving as a result ``spectra'' consisting of a single bin (for more details about the photons energy information contained in the input Photon Event Table, which is mostly instrument specific, see section 4.3).
In the case of PSPC data Projection should be set in correction mode as a first thing:
Midas 001> SET/PROJECTION CORRECT
If you don't want to use the default calibration files for the correction, you can specify them as in the following:
Midas 001> SET/PROJECTION CORRECT=my_effective_area,my_eventrates
If you don't want to apply dead time correction, skip the second file name.
By setting Projection in correction mode spectra corrected for the vignetting effects and for the dead time can be created. The spectra are corrected to the instrument optical axis. The effective area corresponding to the corrected spectra, to be used in the spectral fitting procedures, is always the effective area on axis. It is not so if the data correction is postponed to the Projection run (or if extra corrections, like the PSF correction, are added afterwards): in that case a specific correction vector is associated to each spectrum (see section 4.3.4 for details).
For WFC and HRI data the correction mode is not applicable (data correction must be performed afterwards).
Now, in order to obtain the spectrum of a source, the photons coming from the source area must be selected. Background photons must be selected as well from a defined sourceless portion of the sky, in order to create a background spectrum too. The result of the selections must be binned into calibrated pulse height channel spectra.
Let's assume that the input Photon Event Table is events.tbl and that a reference sky image were already produced and loaded into the image-display window (see sections 4.2.1 and 4.1.1 for details about producing sky images).
The fastest way to mark the spatial selections for a point-like source is via the graphic cursor on the reference sky image:
Midas 011> SELECT/RING [cursor][cursor] BIN AMPL 1 *events *spectra
In this case, as requested in the command line, the user is prompted for cursor input twice because two spectra must be produced in order to allow background subtraction. Whenever it is possible and no contaminating background sources are present, the standard way to proceed is the following: first, a circle centered on the point source is defined; second, an annulus around the source is defined for the production of the background spectra. At the presence of contaminating sources, the procedure may become more complicated than that.
Note that when a spatial selection is defined via the cursor as in the previous example, the user is prompted with the actual command line which is going to be executed -- i.e. the numerical parameters driven command line will always be displayed before execution (the actual numerical parameters used in the selection are stored anyway to the descriptor header of the output tables, and they can be easily retrieved via the command READ/RANGES -- see section 4.3.6).
The output of the two spatial selections is binned in two separate spectra with binsize 1. The spectra are written into separate columns of the output table spectra.tbl, and they are expressed in photon counts/bin.
The MIDAS commands SHOW/TABLE and READ/TABLE can be used to display the structure of the output table:
Midas 012> SHOW/TABLE spectra Midas 013> READ/TABLE spectra
At the first column the lowest energy channel for each spectral bin is listed (in case the bin size is greater than one channel). The two (non corrected) output spectra are listed in columns 2 and 3. Unless differently specified, the column labels are :COUNTS_1 and :COUNTS_2. If Projection was run in correction mode, then the extra columns :CORR_1 and :CORR_2, containing the spectra corrected on-axis, and :ERR_1 and :ERR_2, containing the statistical errors on the corrected spectra, would be created.
In general, if the source is an extended object a more complicated spatial selection must be defined at the beginning of the data processing. For this purpose a Projection command file might be created. In section 4.1.4 some examples of that are given.
For details about spectral correction and background subtraction tasks, see section 4.2.5.