The task omgprep introduces some changes into the grism image files which are necessary for running the source detection and spectral extraction tasks. Omgprep inserts some missing but important keywords into the header of the grism image FITS file. The image is then corrected for distortion. The image is subsequently rotated so that the grism dispersion direction is aligned with respect to the pixel readout columns of the image. This alignment is helpful when identifying and extracting spectra. Omgprep also checks the positional angles of the spectra which can be useful for calibration purposes. If required, scattered light features (e.g., central enhancement) can be removed from the rotated image by using the parameter removescatteredlight=yes, but one must keep in mind that this operation essentialy increases the working time of omgprep.
The original unrotated image is shown in Fig.3. Images prepared for running the source detection and spectra extraction tasks are shown in Fig.4 (for the visual grism) and 7 (for the UV-grism). These have been processed by all omgchain tasks up to and including omgprep.
XMM-Newton SOC -- 2021-11-30