Valid for XMMSAS version 5.3.3
This page will describe the control options to use the RGS XMMSAS
task for more advanced purposes. When you run rgsproc with all the
default setting as we have explained on the
RGS complete ODF to scientific data files page the task may not always do
all your requirements. On this page we describe the following applications:
I) Select another source or coordinates
II) Change the source selection region (e.g. for extended sources).
III) Handling of two sources in the RGS.
I) Select another source or coordinates:
The default settings of the XMMSAS task
rgsproc assume that the object
coordinates are those given in the proposal. Therefore the standard source list
will contain two position PROPOSAL and ONAXIS. If your source is not on those
two positions, or you have a second source on the RGS which spectrum you would
like to study, perform the following steps:
There are two solutions for this problem:
a) run
rgsproc with input source coordinates or
b) add a new source to the source list file
and rerun rgssources, rgsregions, and rgsspectrum again.
If you
know already that your source is not on the PROPOSAL or ONAXIS position you can
run
rgsproc in two ways, either by putting in the coordinated directly on
the command line of the task, or by using a source list created by the detection
task
edetectproc
performed for the EPIC PN or MOS instruments. Please
have a look at
the Source Detection page to see how to perform the source detection. Our
first example will use the coordinates given in the command line of the
rgsproc task:
rgsproc withsrc=yes srclabel=SOURCE srcra=113.64958 srcdec=31.88847
In this example the label in the source list file
...SRCLI_0000.FIT
is set to SOURCE and the coordinated for the
extraction are set to RA=132.10 and DEC=34.95. This will now create a source list file with a third
entry labeled SOURCE.
The second option is to use a source list created by the source detection task
edetectproc as described on
the Source Detection page. As an example we use the source list emllist.ds:
rgsproc withepicset=true epicset=emllist.ds
In this way the task rgsproc will add all sources with have significant
counts in the band between 500 - 2000 eV (ID_BAND=2 in the source detection
list) to the output source list. It still only processes the PROPOSAL and ONAXIS positions. To
activate the sources in the source list, call the FTOOLS task fv and set in the SRCLIST in the
column PROCESS all those sources on True which should be processed and of which you would like
to get a spectrum. After this run the XMMSAS task
rgsregions
(see below).
This task will create new region files that will be used by
rgsspectrum
to extract the source and background spectra.
If you have run rgsproc already, you can still add more sources to the source
list later on without running rgsproc again. First of all this will save
you lots of time, because rgsproc may take hours with large data sets and
second the only things rgsproc would do is the same steps described below,
besides creating the event files.
First step is to run the XMMSAS task
rgssources.
To add new sources there
are two ways again, either by given the coordinates directly into the command
line or by using a sources list created by the source detection task
edetectproc
as described on
the Source Detection page. Here are examples for both:
rgssources srclist=P0123710101R1S004SRCLI_0000.FIT \
addusersource=true label=SOURCE1 \
ra=113.64958 dec=31.88847
This will take the already existing source list P0123710101R1S004SRCLI_0000.FIT and adds a new
user-defined source with the coordinates
ra=113.64958 and
dec=31.88847 with the label name SOURCE1 into the source list.
rgssources srclist=P0123710101R1S004SRCLI_0000.FIT withepicset=true
epicset=emllist.ds
In this example the sources of the EPIC source list emllist.ds (created by
edetectproc) to the source
list file P0123710101R1S004SRCLI_0000.FIT. The
sources will be labeled EPIC00001 and so on depending
how many sources have been derived from the EPIC source list.
After adding (a) new source(s) to the source list you have to choose which
sources of the list should be processed. For this purpose edit the extension
SRCLIST in the source list. Best way to do this is by using the FTOOLS task
fv. Set the logical in the table column PROCESS to T. Next step now is to
run the XMMSAS task rgsregions. for normal point sources this is simply:
rgsregions srclist=P0123710101R1S004SRCLI_0000.FIT
As the default,
rgsregions assumes a file called ....EVENLI0000.FIT as the input events file, e.g. as in our
example P0123710101R1S004EVENLI0000.FIT. If you
have changed the name of the events file, you have to set the parameter evlist=... as well.
Now we are ready to extract the source photons for a spectrum by the task
rgsspectrum:
rgsspectrum evlist=P0123710101R1S004EVENLI0000.FIT \
srclist=P0123710101R1S004SRCLI_0000.FIT \
source=3
This will select the photos at the position of source #3 of the source list P0123710101R1S004SRCLI_0000.FIT from the input event
file P0123710101R1S004EVENLI0000.FIT. The final
source spectrum will be written in a file called P0123710101R1S004SRSPEC1003.FIT with the background spectrum
P0123710101R1S004BGSPEC1003.FIT (both in first order).
If you want to check where the region for the selection of the photons are, use
the XMMSAS task rgsimplot as described basically on
the ODF to science data page. To run rgsimplot in our example you
have to use an additional parameter srcidlist, which
has to be set to 3:
rgsimplot device=/CPS srclistset=P0123710101R1S004SRCLI_0000.FIT \
endispset=image_r1_banana.fits spatialset=image_r1.fits \
srcidlist=3 plotfile=R1_plot.ps
Where device defines the output device (in our example
it is the postscript file R1_plot.ps).
II) Change the source selection region:
If you have notived from the plot created by
rgsimplot
that the selected
region is not exactly what you wanted you can control this by re-running
rgsregions again. Below is an example that shows how to control in the
spatial and PI plains:
Plot created by rgsimplot with default values
|
This example shows the spatial (above) and the PI (below) plains. In the
spatial plain the source it read out perfectly. However, in the PI plain the
selection is a bit off. Below is now shown How to change the selection regions
in spatial and PI spaces
|
The XMMSAS
rgsregions has two parameters to control the selection in the
spatial space xpsfabove and xpsfbelow. For both parameters the values mean the
percentage of the PSF. The default is 90. to move the upper line of the
selection region up give a higher number to the parameter xpsfabove.
To move the lower line down give a higher value to xpsfbelow. in the example
below the upper line will be moved up. In our example this is not necessary for
scientific purposes, but it can be for other examples where you for example have
an extended source.
To control the selection in the PI space use the parameter pdistincl. It specifies the percentage of the pulse-height
distribution. Default is 90 again. In order select a larger size in PI space
select a higher number. In the example given below, the parameter is set to 96:
rgsregions srclist=P0123710101R1S004SRCLI_0000.FIT \
evlist= P0123710101R1S004EVENLI0000.FIT \
pdistincl=96 xpsfabove=99
The result looks like this:
III) Handling of two sources in the RGS:
In some cases it can happen that in the RGS field of view two sources are
observed, as shown in the example below:
One problem appears now with having two sources in the field of view: The tasks
rgssources
and rgsregions do not know about the second source.
They assume that everything outside the area of the main source is background.
Therefore they would use the second source as background, which of course would
produce a wrong source spectrum. A way to check where the RGS tasks define the
background region is to create an image by the XMMSAS task
evselect
and
exclude the background regions. The information about the background region is
given in the ....SRCLI_0000.FIT file in the extension
RGS1_BACKGROUND (for the RGS1 background). As an
example:
evselect table= P0123710101R1S004EVENLI0000.FITwithimageset=true \
xcolumn=BETA_CORR ycolumn=XDSP_CORR \
expression=".not. region(P0123710101R1S004SRCLI_0000.FIT:RGS1_BACKGROUND)" \
imageset=image_r1_back.fits
The result is an image as displayed below:
Standard background in the RGS
|
This image shows the source without the background region. Compared to the image
above we see that the second source has been defines inside the background area.
|
How can we now solve this problem? The trick is that you have to add the second
source to the source list as described above by using the task
rgssources, e.g.:
rgssources srclist=P0123710101R1S004SRCLI_0000.FIT addusersource=true
label=SOURCE2 ra=113.64958 dec=31.88847
Next step is to edit the source file
P0123710101R1S004SRCLI_0000.FIT
by using the ftools task fv. Display the table if the extension
SRCLIST. Now set in the columns PROCESS and BKG_EXCLUDE the
logical to true. After this step, save the file and re-run
rgsregions
again. When you now create a new background excluded image by
evselectit
will give you an image as displayed below: