XMM-Newton SAS Home Page
XMM-Newton Science Analysis System

omdetect (omdetect-5.41) [xmmsas_20230412_1735-21.0.0]


The primary purpose of omdetect is to perform source-detection on either OM IMAGING (images produced by ommodmap), FAST or GRISM mode product images. From version 5.17 it also performs upon images produced by ommosaic. For GRISM images the sources are the zero and first order spectra. For OM IMAGING mode data it also performs photometry on the detected sources and sets source flags. Its primary output file is a FITS file containing a SRCLIST table that contains various parameters of the detected sources.

The following provides an overall description of how omdetect works in the IMAGING mode.

The image is first loaded into memory from the PRIMARY FITS block in the file and also the QUALITY image. For image files produced by ommodmap the latter image will have been constructed by omcosflag and provides a map of where bad-pixels are. For image files produced by ommosaic, the QUALITY image contains additional information about pixel-quality issues. Omdetect's detection algorithms will ignore any image pixel in which the corresponding quality-pixel is 1 (ie a bad pixel) and during the photometry stage it will use it to set bit 0 of the source-quality flag for sources containing one or more bad pixels.

Omdetect computes a background image in order to identify pixels that may be part of a source. It uses two different algorithms for detecting point-like and extended sources and a source is classified as either one from a comparison of its computed width with that of the PSF for the OM filter width. Omdetect uses two internal 2-d integer images to record the pixels that are assigned to point-like and extended sources (the plevel and elevel images, respectively).

The point-source detection algorithm is run first, and for each pixel higher than a specified value above the local background value various checks are made to see if the pixel could be part of a source. If a likely source is found its position and shape parameters are computed by moments and its classification is determined. Usually the source will be classified as point-like (since this algorithm is tuned for such sources) and the pixels on the plevel image that are assigned to the source are set equal to the source number. Occasionally the source will be classified as extended and then the pixels on the elevel image that are assigned to the source are set equal to the source number. The algorithm makes many passes over the image, using a number of different source-identification algorithms tuned to pick up different types of point-like sources (eg sources surrounded by mod-8 pattern, sources that have close neighbours), to pick up as many sources as possible. This algorithm largely overcomes the problem of locating sources contaminated by scattered light features. The pixels are examined in the order of decreasing pixel brightness, and this overcomes other problems due to strong mod-8 patterns, etc.

The extended-source detection algorithm works by examining groups of pixels above a background threshold. Various checks are made to ensure that the group of pixels is not just part of a mod-8 pattern or part of a scattered-light feature. If a likely source is found, its position and shape parameters are computed by moments and it is classified as either point-like or extended. Usually the source will be classified as the latter, and the elevel image pixels assigned to the source are set equal to the source number. Occasionally a faint source may be classified as point-like, and in this case the pelevel image pixels assigned to the source are set equal to the source number. When the detection process is finished a check is made on extended sources to see if they can be split into two or more sources.

Having obtained a list of sources, comprising of various parameters such as positions, extension flags and shapes, aperture-photometry is then performed on each source to produce a count-rate for each source that is consistent with the OM calibration procedure. Omdetect does not compute instrumental magnitudes from these count-rates, and ommag needs to be run using the output source-list to accomplish this. Flags are also added to make the user aware of any potential problems with the photometry of a particular source.

An output source-list file is produced containing source positions, parameters measuring their size and shape, source count-rates, various other photometry parameters and source flags. A count-rate limit is written to the source list file header (keyword CRLIMIT) reflecting the mean 5 sigma above background detection threshold for the image. When the input image is a mosaiced sky-image, the SRCLIST table in the ouput file will contain columns for the RA and DEC coordinates. These coordinates will have been computed using the CRPIX1$\backslash $CRPIX2 and the CRVAL1$\backslash $CRVAL2 values in the header of the input image file.

XMM-Newton SOC -- 2023-04-16