Flat Field Correction of SUMER/XDL Images Udo Schuehle The onboard software for SUMER has foreseen the option to perform a flat field correction to the images before these are compressed and sent to ground. The way this procedure was defined was mainly to account for the pixel-to-pixel variation of sensitivity due to different sensitivity of the amplifiers of the MAMA-detectors. Now, with XDL-detectors, this situation has changed, since only one amplifier is used for x- and y signals, and other detector-specific sensitivity differences of the XDL-detectors, such as nonliniarity in the analog-to-digital conversion (a 1.2 factor between odd and even horizontal lines) and the microchannel plates fiber bundle structures, imprint on the images the detector-specific pattern. Especially this small scale pattern may be very disturbing in the case that the images are ment to be used to identify small flux differences on small features in spectral or spatial dimension. It is therefore very useful have the possibility to correct for the fixed pattern of the detectors right after the images are taken. Since SUMER has two detectors, and we have to expect a small change of this pattern due to e.g. temperature drift, local change of gain due to scrubbing, the in-flight flat field procedure has been implemented. It is recommended to use the onboard flat field correction whenever compression schemes are used that will not restore the full pixel information of the image after decompression. Also, the onboard flat field will always be the most recent one. The flat field raw data are being aquired in a very simple way, just by a long exposure in the Lyman Continuum at 880 Angstroems with the spectrometer in the most unfocussed position. This provides a deep exposure of most pixels, which however is not flat across the total field of view. It therefore will only be used to extract "small scale" features of the size of less than 20 pixels. These are extracted from the raw data using a median filter, and the smoothed image is used to devide the raw data, resulting in a normalized flat field correction image that can be byte-scaled and applied to any other image data. A procedure like the following IDL commands is used to produce the flat field correction data R from the raw image J. By division of the raw image with the median-smoothed image, the small scale features are extracted, while nonuniformities of larger scale than the width of the median, caused by, e.g., nonperfectly flat illumination during the exposure time, have no effect on the flat field correction. Procedure used to produce a flat field correction image: L = median(J,16) t = where (L EQ 0) & L(t) = 1.0 R = J/L s = where (R LT 0.5) & R(s) = 0.5 s = where (R GT 1.5) & R(s) = 1.5 f0 = -125.5 f1 = 255 E = f1 * R - f0 When the Flat Field correction mode is invoced (using the telecommand "FFMode=1"), any image data K will be flat field corrected by FFcorr(K) = K/R = K*f1/(E - f0). Whenever flat field data are aquired, the raw data (J) and the FF-correction matrix (E) are transmitted to ground, so they can be used for flat field correction of image data using the scheme above. Note, by ground processing the ff-data matrix R is restored from E so that the correction procedure is simply given by FFcorr(K)= K/R. When the full detector format is used, the correction can be applied as described. When smaller formats are being used, the exact readout location of the detector must be known, the central column of the image being given by the Reference Pixel address. The IDL-routine for the flat field correction of fits-files is taking care of this.