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


omgprep (omgprep-1.11.1) [xmmsas_20230412_1735-21.0.0]


Description

This tasks clones the OM Imaging Mode Data Image File with the Grism-1 or Grism-2 filter for subsequent pipeline processing. The image file is prepared for extraction of spectra produced by grisms: first the distortion correction is applied, then the image is rotated by the angle corresponding to the grism filter in order to align spectra with respect to the pixel columns (for optimisation of spectra extraction).

Values for additional FITS header keywords necessary for the creation of SSC Data products by subsequent pipeline tasks are taken directly from the OM Priority Window Data Auxiliary File, the OM Periodic and Non-Periodic Housekeeping Files and from the OM Observation Summary File through the ODF Access Layer(OAL) and stored in the Primary Header of the output files.

The task first reads the binning factors (BINAX1 and BINAX2) from the FITS header, along with the BPE binning flag (BINBPE) and the $x$ and $y$ size of the OSW window (in centroided pixels) along with the $x$ and $y$ offsets of the window. The pixel coordinates of the OSW source list are then converted to the PIXCOORD reference frame (2048 by 2048 centroided pixels).

The OM optics have a small amount of distortion, and the CAL call omDistortion is used to get the offsets of the pixel position from a linear scale. These offsets are then applied to the pixel positions. A call to GetPlateScale (CAL) is subsequently used to convert from pixels to radians. The center of the detector, i.e. the position of the OM boresight is pixel 1023.5, 1023.5.

The shift and add process is all performed relative to a reference frame (used to find the tracking stars), so a call to OAL_getAttitude is used, with the time of the reference exposure, to get the spacecraft attitude. The CAL Boresight routine is used to obtain the boresight offset matrix, which is applied to the s/c attitude to get the OM boresight direction. The final section of the code takes the OM OSW image and rotates it in order to align the spectra with respect to the pixel columns. If needed, the scattered light features can be removed from the background by using the parameter removescatteredlight=yes/no. Please, note that using this parameter essentially increases the working time of the task (up to 10 minutes for large images).

XMM-Newton SOC -- 2023-04-16