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 . Data Preparation
X-Ray Astronomy
Telescope Scientist
Eur. Photon Im. Cam.
Survey Science Centre
Overview on Services
Data Analysis
Data Archives
Pipeline Products
Data Preparation
System Setup
PN Data
MOS Data
RGS Data
OM Data
Other Projects
Data Center


Valid HTML 4.01!

[Visit MPE's Home Page] XMM-Newton Data Center
at MPE
[Visit XMM-Newton at MPE]

Create a filtered events file

| Data Analysis | Data Preparation | EPIC PN data | EPIC MOS data | RGS data | OM data | Get test data

Often it is functional to create a new events file that only contains events fulfilling certain criteria, e.g. they are in a given time interval or in a specified energy range. All examples given here are based on EPIC PN data and are done by the XMMSAS task evselect. This task needs the following paramteres to create a filtered event file:

  evselect table=input-file 
           withfilteredset=true destruct=yes keepfilteroutput=true  
           expression="your selection criteria"
table means the input file,
withfilteredset=true destruct=yes keepfilteroutput=true are all necessary to get an output filtered event file
expression is the expression what you want to select, and
filteredset is finally the name of your output file, the file you want to create.

When you select events with the task evselect by using the parameter `expression', be sure not to put any 0 in front of the number you want to select. E.g., if you want to select all events with a PI channel number greater than 500, write it as given as in the example below. Do not use instead!. Evselect will interpret the number 0500 not in the decimal system, it will take it as an octal number, in our example instead of having channel 500 you will get channel 5x64=320. Be aware of that! The task that filter events files according to the selection of events by special properties is described on the basis of four examples:

  1. pattern (column PATTERN and PAT_ID),
  2. energy range (column PI),
  3. spatial region (columns X, Y), and
  4. time interval (column TIME).
  5. Good Time Intervals (using GTI file).

1. Select events by pattern

In this example we want to select events coming only from individual detector pixels (single events). There are two columns in the standard events file that characterize the pattern of an event, PATTERN and PAT_ID. If an event was a single in both columns the value will be 0. To select events which are distributed of two or three detector pixels (double or triple events) from the standard events file it is more complicated because it is coded in binary format. Here is the example for the single events:

evselect table=events.fits withfilteredset=true destruct=yes keepfilteroutput=true \ 
	 expression="PATTERN.eq.0" filteredset=events_pat.fits

2. Select events by energy range

Select events from an energy range between 0.5 and 5.0 keV. In this case the information about the energy is taken from the column PI of the events files.

evselect table=events.fits withfilteredset=true destruct=yes keepfilteroutput=true \
expression=" .and." filteredset=events_energy.fits

3. Select events by spatial region

Select all events detected in a circle with the radius 1200 sky pixels around a source with sky coordinates (X0 = 26025, Y0 = 26125). Here the selection is done according to column X and Y.

evselect table=events.fits withfilteredset=true destruct=yes keepfilteroutput=true \
expression="circle(26025,26125,1200,X,Y)" filteredset=events_source.fits

4. Select events by time interval

Select all events falling into the spacecraft clock time interval [65570000 s, 65580000 s] according to their arrival times stored in column TIME.

evselect table=events.fits withfilteredset=true destruct=yes keepfilteroutput=true \
expression=" .and." filteredset=events_time.fits

5. Select Good Time Intervals from a GTI file

Select all times that are listed in the Good Time Interval (GTI) file. In our example the GTI file gti.fits has been created from an histogram file as described on the GTI Creation page.

evselect table=events.fits withfilteredset=true destruct=yes keepfilteroutput=true \
expression="GTI(gti.fits,TIME" filteredset=events_gti.fits


Of course, also combinations of these selections are possible, e.g.

Select all events in the time interval [65570000 s, 65580000 s] in the circle of 200'' around the source:

evselect table=events.fits withfilteredset=true destruct=yes keepfilteroutput=true \
         expression=" .and. .and. circle(26025,26125,4000,X,Y)" \


Last change: 2002-04-22 16:10 by D. Grupe

© X-Ray Group at MPE (group)
last update:2003/03/07 14:40:33, editor of this page:dgrupe

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