Research & Science Home ESA Public Web Site Sci-Tech Portal      XMM-Newton Public Web Site XMM-Newton Sci-Tech Portal
Astrophysics Missions Planetary Exploration Missions Solar Terrestrial Science Missions Fundamental Physics Missions Science Faculty

rgsproc, coordinates and masks


Introduction

This thread contains a step-by-step recipe to select the correct source coordinates and extraction masks for the processing of RGS point-like sources.

Expected Outcome

Source lists with correct source coordinates and extraction masks.

SAS Tasks to be Used

Prerequisites

Useful Links

Caveats




Procedure

This thread contains a step-by-step recipe to select the correct source coordinates and extraction masks for the processing of RGS point-like sources.

These are some of the most common problems found during the processing of RGS data:

  1. Wrong source coordinates

  2. Sources in the background region

  3. The size of the extraction region


  1. The coordinates of the source selected as 'prime' in the source list are wrong. How can I change them?

    In the example shown below, the coordinates of the PROPOSAL source are incorrect (click on the table to see an enlarged version). They should be R.A.=184.61100 and Dec=+29.81267.

    As a result of this, the extraction mask is far off the source position and, after processing using the proposal coordinates, the final spectrum is wrong (note the empty regions in the dispersion vs energy image):

    Wrong source coordinates

    Wrong Source List

    To change the coordinates of the prime source, the new coordinates have to be entered, and the interactive pipeline has to be run starting at least from the angles stage, to calculate the correct aspect drift corrections.

    This can be done in two different ways:

    • Start the full reprocessing from the beginning:

      rgsproc withsrc=yes srclabel=USER srcra=184.61100 srcdec=+29.81267

      where entrystage and finalstage are left to their default values. withscr=yes is used to define a new prime source by the parameters scrclabel, srcra and srcdec. The label is the name that the new source will get in the source list, coordinates are J2000 in decimal degrees.

    • Alternatively, skip the first rgsproc stage (events), modify the existing source list, and start rgsproc at the second stage (angles).

      rgssources srclist=PxxxxxxyyyyR1zeeeSRCLI_0000.FIT addusersource=yes \
         ra=184.61100 dec=+29.81267 label=USER \
         changeprime=yes userasprime=yes primelabel=USER


      rgsproc entrystage=2:angles

      where ra, dec and label are similar to srcra, srcdec and scrclabel, and changeprime and userasprime have both to be set to yes in order to change the primary source.

      Correct source coordinates

      Source List


  2. There are several X-ray sources in the field of view! How is this taken into account in the processing?

    In case you find sources not included in the source list, you may want to add them for processing (i.e. getting spectra, but not as a primary source) and/or, more important, for excluding them from the background extraction region.

    This example shows an observation of YY Gem (obsid. 01237101), in which the nearby Castor is also visible at the top of the EPIC image (left). The spectrum of this second source is also present in the RGS spatial image (right).

    EPIC image RGS Image


    If the observation is processed with the default rgsproc parameters, the spectrum of Castor would be included in the background:

    Wrong background extraction region

    RGS Image

    and therefore the net source spectrum would be underestimated.

    The image shown above has been created with the command:

    evselect table='PxxxxxxyyyyR1zeeeEVENLI0000.FIT:EVENTS' \
      imageset='background.fit' xcolumn='BETA_CORR' ycolumn='XDSP_CORR'\
      expression='REGION(PxxxxxxyyyyR1zeeeSRCLI_0000.FIT:RGS1_BACKGROUND,BETA_CORR,XDSP_CORR)'

    • To exclude the spectrum of Castor from the background, the first step is to add the coordinates of this source to the already existing source list:

      rgssources srclist='PxxxxxxyyyyR1zeeeSRCLI_0000.FIT' \
        addusersource=yes label='CASTOR' \
        ra=113.64942 dec=31.88828 \
        bkgexclude=yes

      where bkgexclude=yes indicates that a region around the location of this source should be excluded in the computation of the background.


    • The next step is to compute the new extraction masks, both for the source and for the background:

      rgsregions srclist='PxxxxxxyyyyR1zeeeSRCLI_0000.FIT' \
        evlist='PxxxxxxyyyyR1zeeeEVENLI0000.FIT' \
        procsrcsexpr='INDEX==1'

      where procsrcsexpr='INDEX==1' indicates that the extraction mask is computed for the first entry in the source list (i.e. the PROPOSAL coordinates of YY Gem).


    • and finally, extract the source spectrum:

      rgsspectrum evlist='PxxxxxxyyyyR1zeeeEVENLI0000.FIT' \
        srclist='PxxxxxxyyyyR1zeeeSRCLI_0000.FIT' \
        bkgcorrect=yes

    The new background is now correctly estimated, as the contribution from Castor is not included any more:

    Correct background extraction region


  3. The extraction mask is too small for the size of my source...

    It may happen that the source observed is extended and fills part or all of the aperture. The use of the default values for the size of the source and the background extraction regions would lead to erroneous results, both for underestimating the source countrate and for overestimating the background.

    We show in the image below the case of a moderately (1.5 arcmin) extended Supernova Remnant N49 in the LMC. The standard 95%-of-the-PSF extraction region is clearly too small for the actual size of the source (left panel), while a 98% region seems to be more appropriate (right panel).

    95% of the PSF

    98% of the PSF


    • First, the size of the extraction region has to be changed in the source list, and new extraction masks have to be computed:

      rgsregions srclist='PxxxxxxyyyyR1zeeeSRCLI_0000.FIT' \
        evlist='PxxxxxxyyyyR1zeeeEVENLI0000.FIT' \
        xpsfbelow=98 xpsfabove=98 xpsfexcl=99

      where the last parameter, xpsfexcl=99, increases the exclusion region around the source used to determine the background with respect to the default value of 98%.

      [Note that to load RGS extraction regions into ds9 they have first to be converted to the appropriate format with the SAS task cxctods9:

      cxctods9 table='PxxxxxxyyyyR1zeeeSRCLI_0000.FIT:extension' regtype=linear > ds9.reg

      where extension is the desired extension (e.g. RGS1_SRC1_SPATIAL or RGS1_BACKGROUND) ]


    • The final step is to extract the spectrum with the new extraction region:

      rgsspectrum evlist='PxxxxxxyyyyR1zeeeEVENLI0000.FIT' \
        srclist='PxxxxxxyyyyR1zeeeSRCLI_0000.FIT'



    Last Updated: 2 March 2010



    Caveats

    None



   Copyright 2012© European Space Agency. All rights reserved.
This page was last updated on 2 August, 2011.