If the keyword SC_SCAN is set the first action will be to determine the bias offset. For that you can use the overscan region on the chip. This possibility is certainly helpful in case you did not obtain separate bias calibration frames or in case you want to determine the bias offset for each science frame individually.
At initialization keywords are created to contain the overscan and image areas: OV_SEC and IM_SEC, respectively. However they are not filled yet. You can find these numbers using a number of standard MIDAS core commands to display one or more frames, or to plot a number of lines or columns. Then use the command SET/CCD fill in or to adjust the keywords.
The basic command that does the overscan fitting is called OVERSCAN/CCD. It need at least two input parameters: the input and output frame. A third parameter, the overscan area, may be added. If absent it will be taken from the CCD keyword OV_SEC. To determine the bias offset a number of CCD keywords, all starting with ` OV_' will be read, and hence have to be filled correctly. They are displayed in the Table
Table: CCD keywords for overscan fitting
Depending on the readout direction of the CCD (keyword DIRECT) the command will average the data in the overscan region, and fit these values as a function of line-number ( i.e. average in the `x' direction within the overscan region, and fit these as function of `y'). The fit will be subtracted from each column (row) in your frame. In case of a zero order fit the correction is a simple constant. In the other case it will be vector.
After every interactive has been completed the command will ask you if you want to fit the next frame interactively as well, or if you want to apply the overscan correction to all subsequent frames. In the latter case the overscan correction will be stored as a separate calibration frame or, in a case a zero order fit has been used, a single constant.
After the overscan correction is determined, the frames can be trimmed to keep only those parts of the frames that contain valid data. Obviously, this action will speed up the data processing of the subsequent reduction steps. The relevant keyword is SC_TRIM (default value yes) and IM_SEC, containing the data section of the frame.