Документ взят из кэша поисковой машины. Адрес оригинального документа : http://xmm.vilspa.esa.es/sas/8.0.0/documentation/threads/timing.html
Дата изменения: Fri Jun 27 19:40:50 2008
Дата индексирования: Fri Sep 5 23:44:11 2008
Кодировка:

Поисковые слова: m 27
Extraction and correction of an X-ray light curve for a point-like source

  SAS home  

  SAS Watchout items  

  List of SAS threads  

Extraction of a X-ray light curve for a point-like source (command-line version)

This thread contains a step-by-step recipe to extract a light curve of a point-like source for all the X-ray cameras, subtracting the background and correcting for exposure loses. The starting point is a calibrated, concatenated event list.

EPIC

As an example case, we will consider the extraction of a light curve from a pn event list (PN.evt). A similar recipe applies for a MOS event list.
  1. set up your SAS environment (following the SAS start-up thread)

  2. extract an image (in sky coordinates in this example; extraction in detector - DET[XY] - coordinates is possible as well)

  3. evselect table=PN.evt:EVENTS imagebinning=binSize imageset=PNimage.fits withimageset=yes \
      xcolumn=X ycolumn=Y ximagebinsize=80 yimagebinsize=80
  4. display the image
  5. imgdisplay withimagefile=true imagefile=PNimage.fits
  6. select the region, from which the light curve shall be accumulated, using the Region/Circle in ds9 (see Fig.1)

  7. Fig.1: ds9 main window. A circular region (green circle) has been defined using the highlighted menu.


     
  8. double-click with the cursor on the defined region. A window pops up, showing the properties of the region (Fig.2). Write down the coordinates of the Center (25910.5, 25870.5) and the Radius(400).

  9. Fig.2: Selection region properties window, pop'd-up by double-clicking on the region in the main ds9 window


     
    Units of sky coordinates (X,Y) are 0.05 arcsec, hence the radius in our example is 20 arcsec.
     
  10. Be aware: if you are interested in very short time periods, such as they appear in pulsars of cataclysmic variables, you have to perform a a barycentric correction. This means that the arrival time of a photon is shifted as is it would have been detected at the barycenter of the solar system (the center of mass) instead at the position of the satellite. In this way, the data are comparable. The SAS task barycen performs this correction. It is advisable first to copy the event list since the TIME column of the event list is directly overwritten by the barycentric corrected times.
  11.  cp PN.evt PN_evlist.fit 
     barycen table=PN_evlist.fit

  12. Now you can extract a source+background light curve, using all the selection expressions defined so far. In the example, the binsize is 100 seconds. Please take into account that operating with non-synchronous time series can introduce artifacts when they are added or subtracted by programs such as the ftools "lcmath", or directly rejected by the SAS task epiclccorr. To avoid this problem you can use time limits explicitely set in the command line. From SAS 8 upwards, there is no need to do so, since by default the start time is set to the beginning of the exposure
  13. evselect table=PN.evt energycolumn=PI expression='#XMMEA_EP&&(PATTERN<=4)&& \
      ((X,Y) IN circle(25910.5,25870.5,400))&&(PI in [200:10000])' withrateset=yes rateset="light_curve.fits" timebinsize=100 \
    maketimecolumn=yes makeratecolumn=yes timemin=126991800 timemax=130000000
    
    The parameter makeratecolumn=yes produces a light curve in count rates (with errors). Otherwise the light curve is produced in counts (with errors).

  14. repeat step 4. to 6. above to determine the region, from which the background light curve is to be extracted. We will assume in the following the the extraction region correspond to an annulus, centered in (25910.5,25870.5) and with inner and outer radii 1000 and 2000 pixels, respectively

  15. extract a background light curve, using all the selection expressions defined so far, and the same binsize (100 seconds) and energy range as for the source+background light curve
  16. evselect table=PN.evt energycolumn=PI expression='#XMMEA_EP&&(PATTERN<=4)&& \
      ((X,Y) IN annulus(25910.5,25870.5,1000,2000))&&(PI in [200:10000])' withrateset=yes rateset="light_curve_background.fits" timebinsize=100 \
    maketimecolumn=yes makeratecolumn=yes timemin=126991800 timemax=130000000
    

    The light curves are OGIP-complaint, and therefore analyzable with standard XRONOS-like LHEASOFT packages.

  17. However, light curves obtained in such a way should be corrected for diverse effects affecting the detection efficiency, like vignetting, bad pixels, PSF variation and quantum efficiency, as well as for variations affecting the stability of the detection within the exposure, like dead time and GTIs. Since all these effects can affect in a different manner source and background light curves, the background subtraction has to be done accordingly. A SAS task, epiclccorr, performs all of these corrections at once. It requires as input both light curves (which are used to establish the binning of the final corrected background subtracted light curve) and the event file. A simple command line call:
     epiclccorr srctslist=PN_lightcurve_raw.FIT eventlist=PN_evlist.FIT outset=PN_lccorr.fit \
                      bkgtslist=PN1_lc_bck.FIT withbkgset=yes applyabsolutecorrections=yes
     
  18. plot the resulting light curves, eg.
     dsplot table=PN_lccorr.fit withx=yes x=TIME withy=yes y=RATE
    
    This command will launch the following xmgrace window



    Fig.3: xmgrace window, containing the background subtracted exposure corrected light curve

    RGS

    We will assume in what follows that RGS products are available in the working directory, as according to the PPS naming convention. If the following files are available: a) RGS event list; b) RGS source list, a call to the task performing light curve extraction, correction and background subtraction rgslccorr allows a user to create the light curve. It corresponds to a selection performed using the extraction regions in the spatial and order images, according to the chosen source position, and it is corrected for exposure loses, as well as background subtracted.

    1. set up your SAS environment (following the SAS start-up thread)

    2. reduce the RGS data (following the RGS data reduction and spectrum extraction thread)

    3. create eg. a combined 1st and 2nd order, 100-seconds binned exposure corrected and background subtracted light curve, for the 3-rd source in the RGS1 source list
    4. rgslccorr evlist=P0100000101R1S004EVENLI0000.FTZ srclist=P0100000101R1S004SRCLI_0000.FTZ timebinsize=100 
        orders='1 2' sourceid=3 outputfilename=R1_rates.ds
      

    5. plot the resulting light curves, eg.
       dsplot table=R1_rates.ds withx=yes x=TIME withy=yes y=RATE
      
      This command will launch the following xmgrace window



      Fig.3: xmgrace window, containing the background subtracted exposure corrected light curve