skip to content
 
XMM-Newton Guest Observer Facility

XMM-NEWTON ANALYSIS WITH HERA


The Hera facility at the HEASARC has been adapted to run selected tasks from the SAS environment. This allows a user to have access to XMM-Newton data without the need for either SAS or the XMM-Newton CCF to be installed on a Users home machine. Currently only the creation of RMFs and ARFs for EPIC imaging data has been implemented, but the list of available tasks will grow in the future.

What follows is a short script demonstrating the use of Ftools and Hera to extract an EPIC spectrum for a point source and create the RMF and ARF files required for spectral analysis. While SAS need not be installed, the Ftools package is needed as well as Fv (Version 4.3 or higher).

Step 1 - Obtain a calibrated photon event file

This can be done in several different ways.
1) You can download the existing event files from the pipeline products in the archive, either from the XSA or from the GSFC archive. However, these event files may not be the products of the most recent SAS version or CCF.
2) Using the XSA reprocessing feature, you can download the event files processed with the most recent version of the SAS and CCF. Full XSA documentation can be found here, but a quick set of instructions are:

  • 1) Go the the XSA at http://xmm.esac.esa.int/xsa/
  • 2) Start the XSA session
  • 3) Log into the XSA
  • 4) Find the observation that you are interested in and select it for your shopping basket
  • 5) Select the shopping basket
  • 6) Select emproc or epproc and check the box
  • 7) Click "Submit Request"
  • 8) Click "Confirm"
  • 9) Click "Dismiss"
  • 10) Wait for the e-mail conformation that the data are available, and then download

Step 2 - Clean the data set

Keith Arnaud has produced an Ftool-based cleaning script which can be used to select good events from an event file without using SAS commands. The site also has additional information for processing data using Xselect (which has been liberally cribbed for this informational page).

  • 1) Gunzip the event list, e.g.:
    mv P0049150301M1S001MIEVLI0000.FTZ P0049150301M1S001MIEVLI0000.fits.gz
    gunzip P0049150301M1S001MIEVLI0000.fits.gz
  • 2) Get the xmmclean script (created by Keith Arnaud) from the above site.
  • 3) Invoke the script, e.g.:
    xmmclean P0049150301M1S001MIEVLI0000.fits mos1-clean.fits

Step 3 - Extract a spectrum using Xselect

1) Invoke Xselect

riva [255] [snowden]: xselect

                         **  XSELECT V2.3   **

> Enter session name >[xsel] xmm
2) Read the data into XSELECT, e.g.:
xmm:SUZAKU > read events
> Enter the Event file dir >[./] ./
> Enter Event file list >[] mos1-clean.fits
Got new mission: XMM
> Reset the mission ? >[yes] yes
3) Remove bad time intervals by examining the light curve
xmm:XMM-EMOS1-IMAGING > extract curve
xsel:XMM-EMOS1-IMAGING > filter time cursor
Follow the instructions printed on your screen. Note that you can also excise all times with a count rate above some critical value using filter intensity.

4) Make and plot an image. Using "xybin=20" will create 1 arc second pixels

xmm:XMM-EMOS1-IMAGING > extract image xybin=20
xmm:XMM-EMOS1-IMAGING > plot image
5) Extract a spectrum
  • 1) Create a source region in the ds9 plot
  • 2) Set the file format (under "Region" to "ds9/funtools" and set the coordinate system (under WCS) to J2000
  • 3) Save the region (the default file name is ds9.reg)
  • 4) filter the data
xmm:XMM-EMOS1-IMAGING > filter region ds9.reg
6) Extract the spectrum
xmm:XMM-EMOS1-IMAGING > extract spectrum
7) Save the spectrum
xmm:XMM-EMOS1-IMAGING > save spectrum
> Give output file name >[] source.pi
> Group ( or rebin ) the spectra before outputting? >[yes] yes
8) Extract a background spectrum from an annular region
  • 1) Clear the filter region
xmm:XMM-EMOS1-IMAGING > clear region
  • 2) With the original source active, under "Region" and " Properties", click exclude
  • 3) Create a second region larger and outside of the source region. Select include for the property.
  • 4) Select "Move to Front" under Region
  • 5) Save the region (e.g., ds9-back.reg)
  • 6) Filter the data
xmm:XMM-EMOS1-IMAGING > filter region ds9-back.reg
9) Extract the spectrum
xmm:XMM-EMOS1-IMAGING > extract spectrum
10) Save the spectrum and exit Xselect
xmm:XMM-EMOS1-IMAGING > save spectrum
> Give output file name >[source] back.pi
> Group ( or rebin ) the spectra before outputting? >[yes] yes
xmm:XMM-EMOS1-IMAGING > exit
11) Invoke Hera to create an RMF. Note that fv version V4.3 or higher must be operational. The command will upload the relevant data to a computer at GSFC with the current version of SAS and with the current CCF. The GSFC computer will then run the required task (rmfgen) and return the RMF.
fv -runtask rmfgen rmfset=source.rmf spectrumset=source.pi
Note that rmfgen and some other tasks can take a while to complete. Hera is able to run jobs remotely and notify the user by email when the task has been completed. This is done by adding -nowait name@email_address following the -r (or -runtask) on the command line, as in:
fv -r -nowait YourName@YourPlace.edu rmfgen \
rmfset=source.rmf spectrumset=source.pi
The email message will provide instructions on how to download the output data files.

12) Invoke Hera to create an ARF

fv -runtask arfgen arfset=source.arf spectrumset=source.pi \ 
    withrmfset=yes rmfset=source.rmf withbadpixcorr=yes \ 
    badpixlocation="mos1-clean.fits" useodfatt=no
13) Group the data
grppha
Please enter PHA filename[] source.pi
Please enter output filename[] source-grp.pi
GRPPHA[] chkey BACKFILE back.pi
GRPPHA[] chkey RESPFILE source.rmf
GRPPHA[] chkey ANCRFILE source.arf
GRPPHA[] group min 9
GRPPHA[] exit
14) You are now ready to roll so use Xspec or your favorite spectral fitting package to analyze your data.


Download the Adobe Acrobat (PDF) Reader.
If you have any questions concerning XMM-Newton send e-mail to xmmhelp@lists.nasa.gov

This file was last modified on Wednesday, 31-May-2006 08:51:06 EDT
Curator:Michael Arida (SP Sys); michael.arida@nasa.gov

Science Mission Directorate Universe Division
Beyond Einstein | Origins

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

    XMM-Newton Project Scientist: Dr. Richard Mushotzky

    Responsible NASA Official: Phil Newman

    Privacy Policy and Important Notices.