next up previous contents index
Next: Selection of Events Up: 4.2 Preparation Tasks Previous: Instrument Correction and Background

Instrument Correction and Background Subtraction for Light Curves

 

      There are two places where the the vignetting and the dead time effects can be corrected for a light curve. The user is encouraged to apply vignetting and dead time corrections immediately, i.e. during Projection run by setting the correction mode on (see the command SET/PROJECTION, section 4.3.4). In this case the present section can be completely skipped, unless extra corrections like the PSF one have to be added, or in case of WFC and HRI data, where the Projection correction mode cannot be applied. The only thing to be known is that the background subtraction must be performed via the PREPARE/LIGHT_CURVE command:

Midas 001> PREPARE/LIGHT lights :source
  where lights.tbl is the table containing the source+background and the background light curves, and :SOURCE is the column where the result of the subtraction will be written.

If Projection was not run in correction mode, or if extra corrections have to be applied to the data, read the following.

Let's assume that the source+background and the background light curves are written into the same table light.tbl at the columns labeled (by default) :COUNTS_1 and :COUNTS_2. For a point-like source this might be done via the command

Midas 015> SEL/RIN [cursor][cursor] BIN TIM 0.5 in=events out=light
           

The source+background light curve would be generally taken from a circle centered on the source.

The background light curve may be taken from any sky portion which is free of sources, possibly in the neighborhood of the point-like source under examination. Generally, an annulus around the previous circular selection would be the best choice.

To correct a light curve here means to obtain the light curve that would have been observed if the point source were always kept at the instrument optical axis position.

The correction procedure will create a sequence of as many correction factors as time bins which compose the light curve. Such a correction vector is written to a new column of the same table which contains the light curve.

In order to run the correction task a parameter file must be prepared. The following command

Midas 019> CREATE/PARFIL CORR corfile
will create an empty correction parameter file named corfile.par. The parameter file is then automatically presented in editor mode. In case a file with that name already existed, it would not be created again but only the editor would be invoked.

The corrections for 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:effarea_pspcb.tbl, the following entries should be filled in the parameter file:

ATTITUDE_FILE                      attitude
...

DATA_TO_BE_CORRECTED               light,:COUNTS_1
...

EFFECTIVE_AREA_CORRECTION_TABLE    EXSAS_CAL:effarea_pspcb.tbl
...

LIFE_TIME_CORRECTION_TABLE         eventrates
...

All done, the parameter file may 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                     light,:COUNTS_1
REPRESENTATIVE_SPECTRUM                  spectra,:CORR_1
!
! SOURCE_X_SKY_COORDINATE
! SOURCE_Y_SKY_COORDINATE
!
EFFECTIVE_AREA_CORRECTION_TABLE            EXSAS_CAL:effarea_pspcb.tbl
! FILTER_TRANSMISSION_CORRECTION_TABLE     EXSAS_CAL:effarea_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
!

With this parameter file it is meant to correct the source+background light curve at the column COUNTS_1 of the table light.tbl, as shown at the DATA_TO_BE_CORRECTED entry.

Note that a ``representative spectrum'' must be indicated in the parameter file, in case of PSPC data (not for HRI or WFC). This can be any spectrum of the source, possibly corrected, created via a previously executed BIN AMPL command. The representative spectrum is providing the correction procedures with the missing spectral information in the data to be corrected.

Note that the source sky coordinates don't need to be specified, because a circular spatial selection was performed in order to obtain the light curve. As a default, the source is assumed to lie at the circle center. In all other cases, source coordinates must be specified when attitude mode is used.

It is possible to check the parameter file action without executing it, via the following command:

Midas 020> TEST/CORRECTION corfile
  To actually run the correction procedure:

Midas 021> CORRECT/LIGHT_CURVE corfile
The resulting correction vector is written by default to the table column :C_COUNTS_1, because the light curve was contained in the (default!) column labeled :COUNTS_1. This can be checked with the SHOW/TABLE command.

The corrected light curve would be obtained by simply multiplying the :COUNTS_1 column by the :C_COUNTS_1 column entries using the MIDAS command COMPUTE/TABLE. Actually this is necessary only if no background subtraction is going to take place, because the background subtraction procedure would automatically take care of this detail.

The correction of the background light curve 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. This means that the satellite attitude information will not be used to compute the position of the (point-like) source on the detector, as in attitude mode, but the true photon distribution on the detector face will be accessed directly (for more details about correction modes see section 4.3.4).

With the following command, a sub-list of all the photons used in the creation of the background light curve is written to the new Photon Event Table back.tbl:

Midas 022> SELECT/RING 1574.5,-719.5,420.0,1485.0 inp=events out=back

Note that the spatial selection is identical to the one used in the creation of the background light curve. This is not quite necessary, as it will be shown in section 4.3.4: it would be enough to select any sky portion containing at least the background sky portion. In the example, the Photon Event Table back.tbl has the smallest possible size because it contains only the photons contributing to the background light curve.  

In order to correct the background light curve it is not necessary to edit a new parameter file. It is sufficient to temporarily modify the relevant parameters of the already generated parameter file, corfile.par, acting from the command line level. The only differences are that now the data to be corrected are contained in the table column COUNTS_2, the correction must be run in photon mode, and the attitude information is contained in the Photon Event Table back.tbl generated with the last command. Therefore it is enough to type

Midas 023> CORRECT/LIGHT corfile DATA=light,:COUNTS_2 MODE=photon ATTITUDE=back

The correction vector for the background light curve is written by default to the column :C_COUNTS_2.    

The reason why the attitude information was not taken directly from the original Photon Event Table events.tbl is that the photons listed in this table are ordered into a sky map structure for allowing fast access. Therefore this table cannot be sorted in time (as required in the correction run in photon mode) without destroying the sky map structure. Running the correction in photon mode using the original Photon Event Table events.tbl would generate an error message:

Midas 024> CORR/LIGHT corfile DATA=light,:COUNTS_2 MODE=photon ATTITUDE=events

Now a background subtraction of the corrected light curves can be performed, always with the command PREPARE/LIGHT_CURVE. The columns containing the correction vectors must be specified:

Midas 025> PREPARE/LIGHT_CURVE light SOURCE ? :C_COUNTS_1,:C_COUNTS_2
 

The new results are overwritten to the already existing table columns :COUNTS_1_CORR, :COUNTS_2_CORR, :COUNTS_1_ERR, :COUNTS_2_ERR, :SOURCE and :SOURCE_ERR.

The whole procedure may look complicated: it is not. Just have a look at the complete sequence of commands which are necessary in order to produce a corrected and background subtracted light curve: the only difference with all the previous sequences of examples is that the source+background and the background light curves are written to the same table since the beginning (computer output is suppressed here for brevity):

Midas 001> SEL/RING [cursor][cursor] BIN TIME 10 *events *lights
Midas 002> SELECT/RING cursor *events *back
Midas 003> CORR/LIGHT corfile DATA=lights,:COUNTS_1 MODE=att ATTITUDE=attitude
Midas 004> CORR/LIGHT corfile DATA=lights,:COUNTS_2 MODE=pho ATTITUDE=back
Midas 005> PREPARE/LIGHT_CURVE lights SOURCE ? :C_COUNTS_1,:C_COUNTS_2
          and that's all. The first command line creates the raw light curves and write them into the MIDAS table rates.tbl at the column COUNTS_1 and COUNTS_2. The second command selects the photons which are necessary in order to run the background light curve correction in photon mode. The third and fourth command lines create the correction vectors for the two light curves. And the last command line performs the actual background subtraction.

If an extra correction has to be applied to data which have been already corrected for vignetting and dead time during a Projection run set in correction mode, the extra correction factors are written to a new column. By this factors the corrected light curve has to be multiplied.

To work out the data preparation quickly and efficiently it is only possible with some knowledge of the Data Preparation command syntax (see section 4.3 for that).


next up previous contents index
Next: Selection of Events Up: 4.2 Preparation Tasks Previous: Instrument Correction and Background

If you have problems/suggestions please send mail to rosat_svc@mpe-garching.mpg.de