XMM-Newton Science Analysis System
emdiag (emdiag-4.1) [xmmsas_20230412_1735-21.0.0]
Description
emdiag
emulates the on-board computation
of the line and column offsets.
It also emulates event analysis, and provides a masked CCD map,
suitable to build a reference dark frame.
Window keywords are accepted allowing to restrict the whole line of analysis
to a part of the CCD map.
Two different coordinate systems are used in emdiag:
- The on-board coordinate system, used also in the ODF, runs
from 0 to 609 (along RAWX) and 0 to 601 (along RAWY).
It includes under and overscans. All ODF files (diagnostic map,
offset/variance table, event list) refer to this system.
In addition event coordinates (in the event list) are offset by (+2,+2).
- The CCD coordinate system used in the SAS (PIXCOORD in cal),
runs from 1 to 600
along both RAWX and RAWY and does not include
the under/overscans.
All output maps (masked CCD map, bright pixels map), the bad pixels
and the input window parameters refer to that system.
emdiag
calls (in order) the following subroutines, all of which
can be individually switched off:
- OFFSET
emulates the on-board algorithm calculating the line and column offsets.
It analyses the CCD locally to mask out high pixels (bad pixels,
X-rays, cosmic-rays) standing out by more than nsigmas times
the local dispersion above the local median,
and works only on that part of the CCD in view of the sky.
The reference distribution to check each pixel is taken from the 16 pixels
at distance 2 (in RAWX or RAWY)
from the current pixel.
If selectfov is set, a second pass will be performed, removing
all pixels outside the field of view. This provides a better estimate
of the offsets for the lines/columns within the field of view.
The variance of the resulting map (with respect to that constructed
from the line and column offsets, and limited to the field of view if
selectfov=yes) is written in the CCDVAR keyword.
The emulation also accepts as input a masked CCD map
(with high pixels set to 0, output of a first run of emdiag).
Pixels bad or set to 0 are then not used to compute the offsets.
Because the on-board offset computation does not efficiently
remove cosmic-ray patches, thhis is the way to get
good offsets and variance.
- EDUSOFT
performs on the ground the same pattern recognition performed
in flight in IMAGING (or TIMING) mode, and outputs the same information
(RAWX, RAWY, ENERGYE1, ENERGYE2,
ENERGYE3, ENERGYE4, PATTERN and PERIPIX).
If the diagnostic map was obtained in window mode (no overscan),
no event may be found
in the last two lines and columns (as in flight).
The line and column offsets are taken either from an offset/variance
file (if offsets is “read”)
or from the result of the OFFSET subroutine.
Beyond that, EDUSOFT rejects events with ENERGYE1 + ENERGYE2
above the upper EMDH threshold or below the lower EMDH threshold.
In output, all pixels of the map belonging to events recognized by EDUSOFT
are masked out (i.e. set to 0, not a valid value
because of the electronic offset), except patterns 30 and 31
(usually associated with cosmic-rays).
- THRESH
subtracts from the map the line and column offsets taken either
from an offset/variance file or from the OFFSET result (like EDUSOFT).
Then it looks for all events above the EMDH lower threshold.
It creates optionally a map of all selected pixels (offset subtracted).
If EDUSOFT was run before, this map will not contain any valid X-ray event.
In output, all selected pixels are set to 0 in the masked CCD map
(not offset subtracted).
XMM-Newton SOC -- 2023-04-16