XMM-Newton
Science Analysis System: User Guide
Next: 4.4.4 Filtering high background periods
Up: 4.4 Filtering calibrated EPIC event lists
Previous: 4.4.2 Filtering EPIC-pn concatenated event lists
4.4.3 How to get pixels flagged "ON_BADPIX" back into the eventlist
Using the recommended selection expressions #XMMEA_EP and #XMMEA_EM,
or even the more restrictive FLAG==0, pixels flagged as bad are
not taken into account in the analysis. For specific circumstances it
might be desired to revise a bad pixel flag and to make the pixel available
again to the analysis using the task ebadpixupdate.
An important point regarding the bad pixels is that there are
essentially three separate (though not exclusive) sets of bad pixels
that must be dealt with. These are (1) bad pixels up-linked to the
satellite and eliminated on-board, (2) bad pixels identified in
the CCF but not up-linked, and (3) additional bad pixels associated
with the particular observation in question. A corresponding list of
bad pixels, individually for each CCD, is provided by the
BADPIX**-extension tables inside the eventlist FITS-file.
- Create eventlist files still containing bad pixels.
Per default, all EPIC pipeline processing tasks (e[m/p]proc or
e[m/p]chain) perform the search for bad pixels both in CCFs and
in the individual observation and flag the corresponding events from
these bad pixels in the temporary eventlists.
However the treatment of bad pixels at the time of
the creation of the final eventlist file is different for the pn and
the MOS pipeline tasks. The pn tasks take over the events from bad
pixels into the final event list and assign to them the
FLAG==ON_BADPIX, whereas the MOS tasks filter out these bad pixel
events such that they do not appear any more in the final eventlist file.
To get the MOS bad pixels back into the eventlist, it is necessary to
re-run the MOS pipeline tasks using a special parameter to switch off the
final filtering:
emproc flagfilteredevents=yes
or
emchain rejectionflag=764ba000
The use of the emchain parameter rejectionflag=764ba000
is recommended (instead of rejectbadevents=no) because emchain
keeps the events flagged as being ON_BADPIX while it still removes
all other types of bad events.
- Extract bad pixel table from the eventlist file.
The eventlist FITS files contain individual bad pixel tables of all
CCDs. These tables can be extracted with the Ftool fv. After
opening the eventfile with fv <eventlist_name>,
two windows appear: a general fv menu window and a window listing
FITS headers and tables of all extensions inside the eventlist
file. The extensions of the bad pixel tables are named BADPIX** with
** being the CCD number.
The bad pixel table of a specific CCD is presented in a separate
window if the All button under the Table column is
pressed. The table contains for each entry the pixel position in
RAWX/RAWY coordinates, an extension size within the column (YEXTENT),
the TYPE (1=hot, 2=flickering, 3=dead) and
the BADFLAG indicating to which of the sets the bad pixel belongs: (1)
for onboard bad pixel table, (2) for CCF bad pixel table and (3) for
detections via the ebadpixupdate task.
To extract one or more bad pixels tables, mark the corresponding
extensions in the Index column and chose Export HDUs...
from the File menu.
Of course fextract (and fappend, if several bad pixel tables are
required) does the job as well.
- Edit the bad pixel table.
After saving the extracted bad pixel tables in a new file, open this
new file using fv and open the table you want to edit. To delete a
bad pixel entry, mark the corresponding row by clicking on the row
number and chose Edit Delete Selected rows
from the Edit menu. Because bad pixels with BADFLAG=1 are eliminated
onboard, these pixels cannot be recovered and their entries must not
be changed. You have to pay attention on the YEXTENT
column for the corresponding pixel entry. A single bad pixel has
YEXTENT=1. If just one bad pixel within an extended region within a
column should be recovered, the YEXTENT value can be edited directly.
It might be necessary to add an additional
row (Edit Insert Row) to define the
remaining bad pixels in the column correctly. Save the changed
bad pixel table (File Save).
- Update the bad pixel tables in the eventlist file.
The last step is to update the FLAG column inside the eventlist. This
can be done by the task ebadpixupdate. The task needs as input the
changed bad pixel tables and the eventlist file. The following example
shows the update of an EPIC eventlist EPICEVENTLIST.FIT. The
original bad pixel tables of all 12 CCDs have been exported to a file
BADPIXTABLE.FIT. The bad pixel tables of CCD1 and CCD3 have been
changed. The FLAG keywords inside the eventlist file are updated by the
command:
ebadpixupdate eventset=EPICEVENTLIST.FIT fromccf=N overwrite=yes \
badpixtables='BADPIXTABLE.FIT:BADPIX01 \
BADPIXTABLE.FIT:BADPIX03'
Next: 4.4.4 Filtering high background periods
Up: 4.4 Filtering calibrated EPIC event lists
Previous: 4.4.2 Filtering EPIC-pn concatenated event lists
European Space Agency - XMM-Newton Science Operations Centre