MPE/xray/wave
Max-Planck-Institut für extraterrestrische Physik

XMM-Newton Data Analysis - Example
 

Verweis Deutsche Version .  MPE . HEG  . X-Ray Astronomy . Wave . XMM-Newton . Data Analysis . PN Data
X-Ray Astronomy
Wave
ROSAT
XMM-Newton
General
Highlights
Gallery
Telescope Scientist
Eur. Photon Im. Cam.
Survey Science Centre
Overview on Services
Proposal-tools
Data Analysis
Introduction
Data Archives
Pipeline Products
Data Preparation
PN Data
spatial
spectral
timing
MOS Data
RGS Data
OM Data
Documents
Problems
Chandra
Other Projects
Data Center
Exsas

Search
Impressum
Contact

Valid HTML 4.01!

[Visit MPE's Home Page] XMM-Newton Data Center at MPE
Create a simple image from an event file in sky coordinates
[Visit XMM-Newton at MPE]

A simple image can be selected from an event file with either XMM-SAS commands or the FTOOL f2dhisto. Both methods generate almost the same image file (descriptor variations) which can be viewed at convenience with the SAO image viewer saotng or the new Ds9. Please note that FTOOLS does not give all header information that you might need for further use of the image with XMMSAS tools. If you only need the image to get an idea how the exposure looks like f2dhisto will do this job. If you plan to use the image for further analysis, you should use the XMMSAS tasks.

XMMSAS commands

There are three ways to create an image using the XMMSAS commands: 1) using the direct line task evselect, 2) using a Graphical User Interface, e.g. xmmselect, or 3) writing a shell script. The advantage of evselect is that you can use it inside programs or scripts and can run it automatically. The disadvantage is that you have to write a novel in order to create a simple image. The advantage of the GUIs is that they are very easy to use without typing a lot of parameters directly on the screen. The disadvantage, on the other hand, is that can not run automatically, because the GUIs require input. If you have to run this task many times, the best way is to write a shell script as given in the example below.

1) evselect:
The command evselect creates a simple output image file in the following way:

 evselect table=events.fits xcolumn=X ycolumn=Y imagebinning=binSize \
          ximagebinsize=100 yimagebinsize=100 withimageset=true \
	  imageset=image.fits 

where

  table=..	      is the input events file
  x,ycolumn=...       is the column of the coordinates used for the image
  imagebinning=..     is the switch for an automatic or user defined binsize
  x, yimagebinsize=.. is the user defined bin size of the image in each
  		      direction
  withimageset=true   is the switch to create an image
  imageset=...         defines the name of the output image file		      

In our example the bin size is set to 100 which corresponds in the sky pixel system to 5 arcsec, which is about the best resolution you can get with XMM. The image can be displayed by

   saotng image.fits

or

    ds9 image.fits

2) Graphical User Interface:
The more comfortable way is to use the graphical user interface (GUI). This can by either started by the general SAS GUIs (type SAS and it will start a GUI) or use xmmselect. If the SAS-parameter SAS_IMAGEVIEWER is set, xmmselect will automatically start the display automatically to show the output image.

   xmmselect table=events.fits

XmmSelect window
XmmSelect
  1. Choose X and Y in the Column selection (input columns for the image, e.g. X and Y).
     
  2. Click in the Product selection part on Image. This will start the general window of the evselect task.

evselect window
evselect (General)
  1. On the general window you have the options for filtering again. If you are already happy with the set-up then:
  2. Click on Image button on the top.

evselect (Image)
evselect (Image)
  1. Choose a name of the imageset for the output image name (e.g. image.ds).
     
  2. In the imagebinning part for X and Y set to binSize and give in a number, e.g. 100.
     
  3. Click on Run on the bottom line to run the program. (For big data sets this will take a while.)
  4. After the image is created, XMMSELECT will automatically start the image viewer define before (see How to get Started in order how to set the SAS Imageviewer.
      ds9 image.fits
    

Remarks:

  • Caution: the defaults for xcolumn and ycolumn in evselect are the CCD raw coordinates RAWX and RAWY. In this case, evselect will plot all CCDs over each other. In order to get an image of the whole Detector with 12 CCDs in the Full Frame mode set the x and y column to X and Y like in the example!
     

3) Shell script:
The XMMSAS task evselect is not very user-friendly due to the default setting of the parameters and the looooong parameter names you have to type. The GUIs are therefore easier to use, but they have the disadvantage that they do not work in batch jobs. A method that combines both, the availability for batchs and an easier use is to write a shell script. Here is an example of a shell script how to create a simple image, image.com. Please copy it to your disk. Then make it an executable:

   chmod u+x image.com 
The script requires three parameters: 1. input events file name, 2. output image name, and 3. the binning size. With the setup of the script, it assumes that the extension of the input and output files in .fits. Now run the script:
   ./image.com events image 100
In this example events.fits is the input events file, image.fits the output file and 100 in the bin size in X and Y direction. The image is created in X,Y sky coordinates.

FTOOLS f2dhisto

The FTOOL f2dhisto has the following simple syntax:
 

f2dhisto input output xbin ybin xcol ycol xrange yrange 

It selects and bins from the events file an image which again can be viewed with the SAO image viewer.
   setenv SAS_IMAGEVIEWER saotng
   f2dhisto events.fits image.fits 100 100 X Y indef indef
   ds9 image.fits

Remarks:

  • Use fhelp to check the definitions of individual parameters.
     
  • Some header information from images created by f2dhisto is maybe missing.
     
  • Probably due to that reason, the coordinates in an image using DETX, DETY input columns are not the same as when created by evselect. Using X,Y creates the same image coordinates.
     
  • f2dhisto does not allow a selection by e.g. energy or pattern. In order to do a selected you have to run the FTOOLS task fselect first.

Image Display

The image can be displayed with the
  • SAO image viewer saotng or DS9
       saotng image.fits
    or
       ds9 image.fits
  • EXSAS/MIDAS analysis package:
      % exsas 66
      Mi_66 001> create/display 
      Mi_66 002> load/lut rainbow
      Mi_66 003> load/image image.fits cuts=0.0,5.0
    
  • as well as kview (uses menu function for input file):
      % kview
The created image looks like this using the MIDAS display:

MIDAS display of the XMM image


© X-Ray Group at MPE (group)
last update:2008-01-14, editor of this page:Frank Haberl, Dirk Grupe


up © Max-Planck-Institut für extraterrestrische Physik