The processing of grism data is very similar to the one performed in image data by omichain. Some tasks used there are also applied to grism data. The whole process is shown in figure 52. It can be divided into:
For data obtained in full frame (field spectroscopy), the four files composing a full frame low resolution exposure are combined into a single one using omcomb.
As in all OM image mode data, omprep is run to extract information from the tracking history and house-keeping files and to add it to the header. ommodmap performs a modulo_8 correction on the grism image to eliminate this fixed pattern noise.
Then the grism image is corrected from geometric distortion of the detector and then it is rotated so as to have the dispersion direction (the spectra) aligned with the image Y axis. The task omgprep is used to achieve this.
omdetect is used also in grism data to search the image for spectra, both zero and first orders. A source list is generated with all successful detections.
As with normal image mode data, omatt is used to compute the astronomical coordinates of the sources producing the extracted spectra. A sky aligned grism image is also produced.
Then, omgrism will analyse the detections in the source list to establish relations between detected zero orders and the corresponding first orders. A boxcar extraction is performed on the successful relations. The extracted spectra are calibrated in wavelength and flux. In case a relation cannot be found for well defined zero orders, a default extraction is used for the corresponding zero order. The final spectra are written into a fits file.
Finally, omgrismplot is used to produce plots of the spectra (net spectrum, background and flux calibrated) in PDF and PS formats.
The complete processing chain extracts by default only the spectrum of the main target, or object placed at the XMM-Newton boresight, and this is what the user will find in the final products. Alternatively, the user may select to extract all objects in the field of view (extractfieldspectra=yes).