There are two moments where spectral correction for the vignetting and the dead time effects can be applied. If the data to be handled are PSPC data, the user is encouraged to apply such corrections immediately, i.e. during Projection run by setting Projection in correction mode (see the command SET/PROJECTION, section 4.3.4). In this case the present section can be skipped, save for the final part discussing the background subtraction via the PREPARE/SPECTRUM command, unless extra corrections like the PSF correction have to be added to vignetting and dead time, or in case of WFC and HRI data, where the Projection correction mode cannot be applied.
If Projection was not run in correction mode (as must be the case for WFC and HRI data), or if extra corrections have to be applied to the data, read the following.
To ``correct'' a spectrum in the Data Preparation package means to produce the instrument response as a function of the photon energy for the specific spatial, time and energy selections which were applied to the data. In the case of the ROSAT-PSPC, the spectral correction vector consists of 729 elements (i.e. 729 values of the effective area for 729 values of the energy).
In the correction vector are included (when requested) all instrumental effects such as the loss of photons due to the dead time or to a point spread function which extends beyond the limits of a particular (circular) sky selection.
The spectral correction vector is just written into a separate MIDAS table, and it is generally not applied to the data. It is actually handled only within the Spectral Analysis package (i.e. applied to a model spectrum while fitting it to the data). Only in some complicated cases of background subtraction (see section 4.3.4, about the PREPARE/SPECTRUM command) the ratio of the correction vectors from the source and the background spectra is applied (temporarily) to the background spectrum.
In order to run the correction task a parameter file must be prepared. The following command
Midas 018> CREATE/PARFIL CORR corspecwill create an empty correction parameter file named corspec.par. The parameter file is then generally edited, or modified with the command WRITE/PARFIL. In case a file with that name already existed, it would be overwritten.
The corrections for the ROSAT-PSPC vignetting and dead time will be considered in this example. Assuming that the satellite attitude information is contained in the file attitude.tbl, the relevant data for the dead time correction in the house-keeping table eventrates.tbl and the effective area information in the table EXSAS_CAL:effar_pspcb.tbl, the following entries should be filled in the parameter file:
ATTITUDE_FILE attitude ... DATA_TO_BE_CORRECTED spectra,:SPEC ... EFFECTIVE_AREA_CORRECTION_TABLE EXSAS_CAL:effar_pspcb.tbl ... LIFE_TIME_CORRECTION_TABLE eventrates ...
Finally the parameter file should look like this (explanatory comment lines have been omitted for brevity):
! CORRECTION_MODE attitude mode ATTITUDE_FILE attitude ! PHOTON_EVENT_TABLE ! OFF_AXIS_HISTOGRAM_BIN_SIZE 1 DETECTOR_HISTOGRAM_BIN_SIZE 1 ! DATA_TO_BE_CORRECTED spectra,:SPEC ! ! SOURCE_X_SKY_COORDINATE ! SOURCE_Y_SKY_COORDINATE ! EFFECTIVE_AREA_CORRECTION_TABLE EXSAS_CAL:effar_pspcb.tbl ! FILTER_TRANSMISSION_CORRECTION_TABLE EXSAS_CAL:effar_pspcb.tbl ! PSF_CORRECTION_IMAGE EXSAS_CAL:psf_pspc ! DETECTOR_SHADOWING_CORRECTION_TABLE ! DETECTOR_SENSITIVITY_CORRECTION_TABLE LIFE_TIME_CORRECTION_TABLE eventrates ! ! OUTPUT_CORRECTION_TABLE !
This parameter file is meant to create the correction vector for the source spectrum which will result from the background subtraction, but in the parameter DATA_TO_BE_CORRECTED the source+background table column SPEC is indicated. The reason for that is that the correction procedure will take in consideration the photon selection history of that spectrum in order to create the appropriate correction vector. In fact, this history is identical to the background subtracted spectrum which is going to be produced (more details about that in section 4.3.4).
The correction procedure should always be run before the background subtraction because the correction vectors for the source+background and background spectra may be also involved in the background subtraction procedure itself.
Note that the source sky coordinates don't need to be specified in the parameter file, because a circular spatial selection was performed in order to obtain the spectrum. As a default, the source is assumed to lay at the circle center. In all other cases, the source position must be specified (when attitude mode is chosen).
It is possible to check the parameter file action without executing it, via the following command:
Midas 018> TEST/CORRECTION corspecTo actually run the correction procedure:
Midas 019> CORRECT/SPECTRUM corspecThe resulting correction vector is written by default to the table spectra_c.tbl as the spectrum was contained in the table named spectra.tbl.
To the table offhis.tbl is written the off axis histogram, i.e. the distribution of the point source distances from the instrument optical axis during the time intervals selected for the spectral selection. In the WFC correction case, a detector histogram is written to the image dethis.bdf. The detector histograms are a by-product of the correction procedure, and it is always advisable to have a look at them (for instance by plotting the off axis histogram into the graphic window, or loading the detector histogram to the image display), checking against possible inconsistencies.
The correction of the background spectrum is necessary only in pointed observations, when the background spatial selection was defined far away from the source.
The correction of the background spectrum introduces a new problem: since the background is an extended object, there are no specific sky coordinates to be supplied to the parameters SOURCE_X_SKY_COORDINATE and SOURCE_Y_SKY_COORDINATE in the correction parameter file. This is exactly the case in which the correction should be run in photon mode instead of being run in attitude mode (as it was in the above example). This means that the satellite attitude information will not be used to compute the position of the (point-like) source on the detector, but the true distribution on the detector face of the selected photons will be accessed directly (for more details about correction modes see section 4.3.4).
Assuming that the correction vector for the background is written to the table back_c, in order to perform the background subtraction, just take the command
Midas 020> PREPARE/SPECTRUM spectra result ? 9 spectra_c,back_c
Here the spectra contained in the first two data columns in table spectra.tbl are used as source+background and background spectra. Before the subtraction the background spectrum is normalized to the source+background spectrum selected sky area, and it is ``straightened up'' according to the differences found between the two spectral correction vectors. The spectra are converted into count rate and they are written into the output table result.tbl together with the result of the background subtraction. The background subtracted spectrum is rebinned (with a variable binsize) in order to get a constant ratio S/N = 9 over each spectral bin, as indicated by the fourth parameter in the command line.
The output table has a standard structure:
Midas 021> SHOW/TABLE result Table : result [Transposed format] No.Columns : 9 No.Rows : 34 All.Columns: 9 All.Rows : 40 Sorted by # 0 Reference : 0 Col.# 1:F Unit: Format:I1 R*4 Col.# 2:L_CH Unit: Format:G12.5 R*4 Col.# 3:H_CH Unit: Format:G12.5 R*4 Col.# 4:CR_SB Unit:1/s Format:G12.5 R*4 Col.# 5:CR_SB_ERR Unit:1/s Format:G12.5 R*4 Col.# 6:CR_B Unit:1/s Format:G12.5 R*4 Col.# 7:CR_B_ERR Unit:1/s Format:G12.5 R*4 Col.# 8:CR_S Unit:1/s Format:G12.5 R*4 Col.# 9:CR_S_ERR Unit:1/s Format:G12.5 R*4 Selection: ALL Midas 022>It is easy to identify the contents of each of the table columns:
Midas 022> CREATE/GRAPHIC Midas 023> PLOT/SPECTRUM result S Y Midas 024> SET/GRAPHIC LTYPE=2 Midas 025> OVERPLOT/SPECTRUM result B
Note that the resulting spectral data are expressed in counts s bin , but they are normalized to counts s channel in the plot. For this reason to display a spectrum via the MIDAS command PLOT/TABLE must be avoided.