skip to content
 
XMM-Newton Guest Observer Facility

THE XMM-NEWTON ABC GUIDE, STREAMLINED

EPIC-PN (TIMING mode), Hera Parameter Window


Contents


Prepare the Data
Reprocess the Data
Apply Standard Filters
Make a Light Curve
Extract the Source and Background Spectra
Determine the Spectrum Extraction Areas
Check for Pile Up
My Observation is Piled Up! Now What?
Create the Photon Redistribution Matrix (RMF) and Ancillary File (ARF)

Prepare the Data

Please note that the two tasks in this section (cifbuild and odfingest) must be run in the ODF directory. These are the only tasks with that requirement, and after this section, we will work exclusively in our reprocessing directory.

Many SAS tasks require calibration information from the Calibration Access Layer (CAL). Relevant files are accessed from the set of Current Calibration File (CCF) data using a CCF Index File (CIF). To make the ccf.cif file, navigate into the ODF directory using the icons in the User Account Window of the Hera interface. Then, in the Tool Parameter Window, in the Task Name box, enter cifbuild and click "Get".

The task odfingest extends the Observation Data File (ODF) summary file with data extracted from the instrument housekeeping data files and the calibration database. It is only necessary to run it once on any dataset, and will cause problems if it is run a second time. If for some reason odfingest must be rerun, you must first delete the earlier file it produced. This file largely follows the standard XMM naming convention, but has SUM.SAS appended to it. To run odfingest, in the Tool Parameter Window, in the Task Name box, enter odfingest and click "Change".

Hera automatically resets the relevant environmental parameters to the output of these tasks, so we can continue merrily on our way.

Reprocess the Data

To reprocess the data, go up one directory in the tree and make a new working directory using the buttons in the upper left corner of the User Account Window. When you are in the working directory, call epproc. (Due to security concerns, epchain is disabled.) As in the previous section, just enter the task name in Task Name box and click "Change".

By default, epproc does not keep any intermediate files it generates. Epproc designates its output event files with "ImagingEvts.ds". In any case, it is convenient to rename them something easy to type; this can be done by clicking on the pen icon next to the file name in the User Account Window. We'll assume the new name for the event file is pn.fits.

Apply Standard Filters

The filtering expression for the PN in TIMING mode is:

   (PATTERN <= 4)&&(PI in [200:15000])&&#XMMEA_EP

The first two expressions will select good events with PATTERN in the 0 to 4 range. The PATTERN value is similar the GRADE selection for ASCA data, and is related to the number and pattern of the CCD pixels triggered for a given event. Single pixel events have PATTERN == 0, while double pixel events have PATTERN in [1:4].

The second keyword in the expressions, PI, selects the preferred pulse height of the event. For the PN, this should be between 200 and 15000 eV. This should clean up the image significantly with most of the rest of the obvious contamination due to low pulse height events. Setting the lower PI channel limit somewhat higher (e.g., to 300 or 400 eV) will eliminate much of the rest.

Finally, the #XMMEA_EP filter provides a canned screening set of FLAG values for the event. (The FLAG value provides a bit encoding of various event conditions, e.g., near hot pixels or outside of the field of view.) Setting FLAG == 0 in the selection expression provides the most conservative screening criteria and should always be used when serious spectral analysis is to be done on PN data.

To filter the data, enter evselect into the Task Name box and click "Change". Then,

  1. By the table parameter, use the Browse button to select the event file, pn.fits.
  2. Set keepfilteroutput to yes. This will make the parameters that are relevant specifically to filtering a file appear.
  3. Set withfilteredset to yes. Enter an output file name in filteredset, pn_filt.fits. In the expression parameter box, enter (PATTERN <= 4) && (PI in [200:15000]) && #XMMEA_EP
  4. Click "Run evselect".

Make a Light Curve

The XMM-Newton Observatory is susceptible to soft particle flaring, so it is necessary to examine the light curve to determine how much of the data is useful.

To create a light curve, enter evselect into the Task Name box and click "Change". Then,

  1. By the table parameter, use the Browse button to select the event file, pn.fits.
  2. Set withrateset to yes. This will make the parameters that are relevant specifically to making a light curve appear.
  3. Set maketimecolumn to yes, set timebinsize to 50, and enter an output file name in rateset. We will use pn_ltcrv.fits.
  4. Click "Run evselect".

The output file pn_ltcrv.fits can be viewed by downloading and displaying it with fv on your local machine.

   fv pn_ltcrv.fits &

In the pop-up window, the RATE extension will be available in the second row (index 1, as numbering begins with 0). Selecting PLOT from this row will let you choose the column name and axis on which to plot it.

The light curve is shown in Figure 1. No flares are evident, so we will continue to the next section. However, if a dataset does contain flaring, it should be removed in the same way as shown for EPIC IMAGING mode data here.

Figure 1: The Cen X-3 light curve from 0.2-15 keV.

Extract the Source and Background Spectra

First, we will need to make an image of the filtered event file over the energy range that we are interested in. For this example, we'll say 0.5-15 keV. Since we're using the PN, remember to use the FLAG==0 requirement. Enter evselect into the Task Name box and click "Change". Then,

  1. By the table parameter, use the Browse button to select the event file, pn_filt.fits.
  2. Set withimageset to yes. This will make parameters that are specific to making an image appear.
  3. Enter an output file name in imageset. We will use image.fits. Confirm that xcolumn is set to RAWX and ycolumn is set to RAWY, and ximagebinsize and yimagebinsize are set to 1. In the expression parameter box, enter (FLAG==0) && (PI in [500:15000]).
  4. Click "Run evselect".

The image can be downloaded and displayed with ds9. As can be seen in Figure 2, the source is centered on RAWX=37. We will extract this and the 10 pixels on either side of it.

  1. By the table parameter, use the Browse button to select the event file, pn_filt.fits.
  2. Set keepfilteroutput, withfilteredset, and withspectrumset to yes. This will make parameters that are specific to filtering an event file and extracting a spectrum appear. Set withspecranges to yes.
  3. Enter an event file output name in filteredset. We will use pn_filt_source.fits. Enter a spectrum output file name in spectrumset. We will use source_pi.fits. Set energycolumn to PI. In the expression parameter box, enter (FLAG==0) && (PI in [500:15000])&&(RAWX in [27:47]). Set specchannelmax to 20479.
  4. Click "Run evselect".

For the background, the extraction area should be as far from the source as possible. However, sources with > 200 ct/s (like our example!) are so bright that they dominate the entire CCD area, and there is no source-free region from which to extract a background. (It goes without saying that this is highly energy-dependent.) In such a case, it may be best not to subtract a background. Users are referred to Ng et al. (2010) for an in-depth discussion. While this observation is too bright to have a good background extraction region, the process is shown below nonetheless for the sake of demonstration. With the evselect task,

  1. By the table parameter, use the Browse button to select the event file, pn_filt.fits.
  2. Set keepfilteroutput, withfilteredset, and withspectrumset to yes. Set withspecranges to yes.
  3. Enter an event file output name in filteredset. We will use pn_filt_bkg.fits. Enter a spectrum output file name in spectrumset. We will use bkg_pi.fits. Set energycolumn to PI. In the expression parameter box, enter (FLAG==0) && (PI in [500:15000])&&(RAWX in [3:5]). Set specchannelmax to 20479.
  4. Click "Run evselect".
Figure 2: Image of Cen X-3 timing data.

Check for Pile Up

Depending on how bright the source is and what modes the EPIC detectors are in, event pile up may be a problem. Pile up occurs when a source is so bright that incoming X-rays strike two neighboring pixels or the same pixel in the CCD more than once in a read-out cycle. In such cases the energies of the two events are in effect added together to form one event. Pile up and how to deal with it are discussed at length here and here, respectively, and users are strongly encouraged to refer to those sections. Briefly, we deal with it in PN TIMING data essentially the same way as in IMAGING data, that is, by using only single pixel events, and/or removing the regions with very high count rates, checking the amount of pile up, and repeating until it is no longer a problem. To check for pile up, enter epatplot in the Task Name box and click "Change". Then,

  1. By the set parameter, use the Browse button to select the event file pn_filt_source.fits. Set useplotfile to yes and enter the output postscript file name in the plotfile parameter; we will use pn_epat.ps. Set withbackgroundset to yes and next to the backgroundset parameter, use the Browse button to enter the event file pn_filt_bkg.fits.
  2. Click "Run epatplot".
The output is shown in Figure 3. In the lower plot, we can see that there is a large difference between the modeled and observed single and double pattern events, and that the observed-to-model fraction for doubles is over 1.0, indicating that the observation is piled up.

Figure 3: The output of epatplot.

My Observation is Piled Up! Now What?

There are a couple ways to deal with pile up. First, you can use event file filtering procedures to include only single pixel events (PATTERN==0), as these events are less sensitive to pile up than other patterns.

You can also excise areas of high count rates, i.e., the boresight column and several columns to either side of it. (This is analogous to removing the inner-most regions of a source in IMAGING data.) The spectrum can then be re-extracted and you can continue your analysis on the excised event file. As with IMAGING data, it is recommended that you take an iterative approach: remove an inner region, extract a spectrum, check with epatplot, and repeat, each time removing a slightly larger region, until the model and observed pattern distributions agree.

We can extract the boresight column and several columns to either side using the procedure shown above; for the boresight column, set the spectrumset parameter to source_pi_WithBore.fits, expression to (FLAG ==0) && (PI in [500:15000]) && (RAWX in [27:47]), and filteredset to pn_filt_source_WithBore.fits. For just the columns to either side of the boresight, set the spectrumset parameter to source_pi_NoBore.fits, expression to (FLAG ==0) && (RAWX in [27:47]) &&! (RAWX in [29:45]), and filteredset to pn_filt_source_NoBore.fits. Then check with epatplot as we go along until no pile up remains.

Be aware that if you do this, you will need to use a non-standard way to make the ancillary files (ARFs) for your spectrum! This is discussed further in the next section . You will need the spectra of the full extraction area and the excised area, so we might as well get them now. We already have it for the full extraction area, so for the excised area, enter evselect in the Task Name box and click "Change". Then,

  1. By the table parameter, use the Browse button to select the event file, pn_filt.fits.
  2. Set keepfilteroutput, withfilteredset, and withspectrumset to yes. This will make parameters that are specific to filtering an event file and extracting a spectrum appear. Set withspecranges to yes.
  3. Enter an event file output name in filteredset. We will use pn_filt_source_NoBore.fits. Enter a spectrum output file name in spectrumset. We will use source_pi_NoBore.fits. Set energycolumn to PI, and specchannelmax to 20479. In the expression parameter box, enter (FLAG ==0) && (PI in [500:15000]) && (RAWX in [29:45]).
  4. Click "Run evselect".

Determine the Spectrum Extraction Areas

The source and background region areas can now be found. (This process is identical to that used for IMAGING data.) This is done with the task backscale, which takes into account any bad pixels or chip gaps, and writes the result into the BACKSCAL keyword of the spectrum table. To find the source and background extraction areas, enter backscale in the Task Name box and click "Change". Then,

  1. By the spectrumset parameter, use the Browse button to select the spectrum, source_pi_NoBore.fits. By the badpixlocation parameter, use the Browse button to select the event file, pn_filt.fits.
  2. Click "Run backscale".
Follow the same procedure for the background spectrum, setting spectrumset to bkg_pi.fits.

Create the Photon Redistribution Matrix (RMF) and Ancillary File (ARF)

Making the RMF for PN data in TIMING mode is exactly the same as in IMAGING mode, which is demonstrated here. To make the RMF, enter rmfgen in the Task Name box and click "Change". Then,

  1. Set the rmfset parameter to the output file name. We will use source_rmf_NoBore.fits.
  2. By the spectrumset parameter, use the Browse button to select the spectrum file, source_pi_NoBore.fits.
  3. Click "Run rmfgen".

In our example, because we excised the boresight columns, we will need to make an ARF for the full extraction area, another one for the piled up area, and then subtract the two to find the ARF for the non-piled regions. We already have the spectra for the full extraction area and the excised area, so we will use them to make the ARFs. Enter arfgen in the Task Name box and click "Change". Then,

  1. By the spectrumset parameter, use the Browse button to select the spectrum file, source_pi_WithBore.fits.
  2. Set arfset to the output file name; we will use source_arf_WithBore.fits. Set detmaptype to psf.
  3. Click "Run arfgen".

We can easily make an ARF for the excised file by changing the WithBore to NoBore in the arfgen parameters.

Now we can subtract them. Enter addarf in the Task Name box and click "Change". Then,

  1. By the list parameter, use the Browse button to select the arfs, source_arf_WithBore.fits and source_arf_NoBore.fits. Enter the weights by the weights parameter, separated by a space, 1.0 -1.0. Set the out_ARF parameter to the output file name; we will use source_arf.fits.
  2. Click "Run addarf".

If you are working with a different data set and did not need to excise any boresight columns, making the ARF is the same as in IMAGING mode, which is demonstrated here.

The spectrum can be fit using HEASoft or CIAO packages, as SAS does not include fitting software.


If you have any questions concerning XMM-Newton send e-mail to xmmhelp@lists.nasa.gov

This file was last modified on Tuesday, 19-Nov-2013 17:08:40 EST
Curator:Michael Arida (ADNET); michael.arida@nasa.gov

NASA Astrophysics

  • FAQ/Comments/Feedback
  • Education Resources
  • Download Adobe Acrobat
  • A service of the Astrophysics Science Division (ASD) at NASA/ GSFC

    XMM-Newton Project Scientist: Dr. Steve Snowden

    Responsible NASA Official: Phil Newman

    Privacy Policy and Important Notices.