The illumination correction is made by smoothing the reduced blank sky frame heavily. The illumination frame is then divided into the frames during processing to correct for the illumination difference between the flat field and the objects. Like the flat field frames, the illumination correction frames may be data set dependent and hence there should be an illumination frame for each data set.
The smoothing algorithm is a moving average over a two dimensional box. The algorithm uses a box size that is not fixed. The box size is increased from the specified minimum at the edges to the maximum in the middle of the frame. This permits a better estimate of the background at the edges, while retaining the very large scale smoothing in the center of the frame. Other tools in MIDAS can also be used for smoothing, but this may need more of the user and may take more processing time.
Blank sky frames may not be completely blank, so a sigma clipping algorithm may be used to detect and exclude objects from the illumination pattern. This is done by computing the rms of the frame lines relative to the smoothed background and excluding points exceeding the specified threshold factors times the rms. This is done before each frame line is added to the moving average, except for the first few lines where an iterative process is used. If this approach is not successful manual removal of objects (stars) is required.
Both in the pipe line reduction and in the manual reduction the illumination corrections to the science frames will be done provided the keyword SC_ILCOR is set to `yes'. In both cases it is assumed that the illumination frames are available. In addition, in the case of pipe line processing the names of the illumination corrections must be stored in the Association Table. If an illumination correction frame is absent an error message will be issued and the illumination correction for the associated science frame will not be done.