XMM-Newton Science Analysis System: User Guide



5.6 Running the RGS processor rgsproc

The work done by rgsproc,

http://xmm-tools.cosmos.esa.int/external/sas/current/doc/rgsproc/index.html

falls into two main parts: first the construction of a calibrated event list, and second the selection of events to be accumulated into spectra for one or more of the entries in a source list. Event construction starts from the spatial coordinates and pulse heights among the 6 columns of raw readout data stored in one file for each CCD and ends with 17 calculated columns in one merged file for each RGS. A CCD delivers a few hundred thousand events in a typical observation and the merged file contains, therefore, perhaps a few million before event selection begins. The final selected event file can contain less than half of the merged events after exclusion of hot pixels and columns, although after the RGS instruments were cooled in November 2002 the hot stuff became much less numerous. Evidently, the rejection of hot columns and pixels is a fundamental part of the analysis. The further selection of events for source and background spectra then depends on the position of the source within the RGS apertures as determined by its coordinates held in the source list and the extent of the source and background selection regions chosen explicitly or by default.

Here is an example rgsproc run on Mkn421 using accurate NED source coordinates in the directory scheme discussed above. As discussed in detail in § 2.3, the environment variables SAS_CCFPATH, SAS_ODF and SAS_CCF supply the SAS with calibration and data information so that rgsproc, which always writes its output files to the working directory, may be run in any location.

 setenv SAS_CCFPATH /path/to/<CCF>
 setenv SAS_CCF /path/to/<ODF> 
 setenv SAS_ODF /path/to/<ODF> 
 cifbuild
 setenv SAS_CCF /path/to/<ODF>/ccf.cif
 odfingest                              
 setenv SAS_ODF /path/to/<ODF>/[rev]_[obsid]_SCX00000SUM.SAS
 cd $SAS_ODF
 mkdir RGS
 cd RGS
 rgsproc withsrc=yes srclabel=Mkn421 \
                      srcstyle=radec srcra=166.113808 srcdec=+38.208833

The task odfingest needs only to be run once after receipt of the ODF, while a new ccf.cif calibration index file should be regenerated with cifbuild whenever a new relevant CCF component is available. rgsproc has about a hundred potentially adjustable parameters, see http://xmm-tools.cosmos.esa.int/external/sas/current/doc/rgsproc/node26.html

In this case, the source coordinates only have been specified, leaving all other parameters at their default values, some of the more important of which are shown in Table 7.


Table 7: Default values of key rgsproc parameters.
parameter default value
entrystage 1:events
finalstage 6:lightcurve
orders 1 2
withdiagoffset true
spectrumbinning lambda
lambdabinref $4.005$ angstrom
lambdabinwidth $0.010$ angstrom
nlambdabins 3600
xdispbinning binSize
xdispbinref $-0.0009126$ radians
xdispbinwidth $+0.0000108$ radians
nxdispbins 170
bkgcorrect no
keepcool yes
  BAD_SHAPE
  ON_BADPIX
rejflags NEXT_TO_BADPIX
  BELOW_ACCEPTANCE
  NEXT_TO_CCD_BORDER
xpsfincl 95%
xpsfexcl 98%
pdistincl 95%
rows 4000
timebinsize 1000


As it is running, rgsproc gives regular messages about its progress, although these are not designed to prompt any action except in the unlikely event of error. The final outcome, as shown in table 8, is a set of 16 FITS files for each RGS consisting of

and 3 other general-purpose FITS files. Source spectra are not background corrected by default so that the corresponding background spectra must explicitly be included in subsequent analysis with Xspec  for example.

The RGS files have names of the form

If a file does not apply to a particular exposure, Sxxx is replaced by X000. Similarly, 0 and 000 show that the order and source number, respectively, are deemed irrelevant.


Table 8: Files produced by rgsproc for an observation of Mkn421 with default parameters except for the source name and coordinates.
(*) Not in RGS small-window mode.
File Contents
P0136540101R1S001BGSPEC1003.FIT RGS1 1st order background spectrum (*)
P0136540101R1S001BGSPEC2003.FIT RGS1 2nd order background spectrum (*)
P0136540101R1S001EVENLI0000.FIT RGS1 screened event list
P0136540101R1S001EXPMAP0000.FIT RGS1 exposure map
P0136540101R1S001RSPMAT1003.FIT RGS1 1st order response matrix
P0136540101R1S001RSPMAT2003.FIT RGS1 2nd order response matrix
P0136540101R1S001merged0000.FIT RGS1 raw merged event list
P0136540101R1S001SRCLI_0000.FIT RGS1 source list
P0136540101R1S001SRSPEC1003.FIT RGS1 1st order source+background spectrum
P0136540101R1S001SRSPEC2003.FIT RGS1 2nd order source+background spectrum
P0136540101R1S001SRTSR_1003.FIT RGS1 1st order source light curve
P0136540101R1S001BGTSR_1003.FIT RGS1 1st order background light curve (*)
P0136540101R1S001SRTSR_2003.FIT RGS1 2nd order source light curve
P0136540101R1S001BGTSR_2003.FIT RGS1 2nd order background light curve (*)
P0136540101R1X000hkgti_0000.FIT RGS1 housekeeping good time intervals
P0136540101OBX000attgti0000.FIT RGS1 spacecraft attitude good time intervals
P0136540101R2S002BGSPEC1003.FIT RGS2 1st order background spectrum (*)
P0136540101R2S002BGSPEC2003.FIT RGS2 2nd order background spectrum (*)
P0136540101R2S002EVENLI0000.FIT RGS2 screened event list
P0136540101R2S002EXPMAP0000.FIT RGS2 exposure map
P0136540101R2S002RSPMAT1003.FIT RGS2 1st order response matrix
P0136540101R2S002RSPMAT2003.FIT RGS2 2nd order response matrix
P0136540101R2S002merged0000.FIT RGS2 raw merged event list
P0136540101R2S002SRCLI_0000.FIT RGS2 source list
P0136540101R2S002SRSPEC1003.FIT RGS2 1st order source+background spectrum
P0136540101R2S002SRSPEC2003.FIT RGS2 2nd order source+background spectrum
P0136540101R2S002SRTSR_1003.FIT RGS2 1st order source light curve
P0136540101R2S002BGTSR_1003.FIT RGS2 1st order background light curve (*)
P0136540101R2S002SRTSR_2003.FIT RGS2 2nd order source light curve
P0136540101R2S002BGTSR_2003.FIT RGS2 2nd order background light curve (*)
P0136540101R2X000hkgti_0000.FIT RGS2 housekeeping good-time intervals
P0136540101OBX000attgti0000.FIT RGS2 spacecraft attitude good time intervals
P0136540101OBX000ATTTSR0000.FIT XMM-Newton spacecraft attitude data
P0136540101OBX000fluxed1000.FIT Combined RGS1 & RGS2 1st order source flux spectrum
P0136540101OBX000fluxed2000.FIT Combined RGS1 & RGS2 2nd order source flux spectrum




Subsections
European Space Agency - XMM-Newton Science Operations Centre