next up previous contents
Next: Using the COMPUTE Command Up: CCD Detectors Previous: Averaging and Merging Frames

Cleaning Images

This section describes three functions which have been created to cleanup defects in images. The first two functions for cleaning rows and columns are particularly useful for CCD-images. The third function is of a more general nature, but also quite useful for CCD-images.

Cleaning rows or columns -- Since CCDs are discrete row and column devices, they often exhibit defects which effect an entire row or column. These can often be removed with the commands:

MODIFY/COLUMN INPUT OUTPUT [C or V] [columns]
MODIFY/ROW INPUT OUTPUT [C or V] [rows]
These commands require an input frame, and an output frame. The parameter C or V determines whether the routine computes and adds a constant to the indicated columns/rows of the input data (option C), or if the routine uses the adjacent pixel values to extrapolate data for the indicated columns/rows (option V). The rows or columns specification is not required if the input also specifies a table containing the rows or columns to be corrected. See the detailed command description for a complete description.

Cleaning areas and Removing objects --  A general purpose MIDAS command has been created for cleaning areas of an image. This is particularly useful for removing the permanent defects which may exist in the CCD-frames and which cannot be removed by the MODIFY/COLUMN or MODIFY/ROW commands. This command uses fitted surfaces to replace pixel values in the specified areas. It would also be useful for removing stars and so forth from an image. The command is:

MODIFY/PIXELS INPUT OUTPUT [AREA] [DEGREE] [MARK]
See the detailed command description in Vol. A, Appendix A for a description of how to use this command and how to specify the various input parameters.

The input parameter can be specified as CURSOR, and then the currently displayed image will then be used to interactively clean a resulting image with the cleaning area specified by the cursor positions.

CCD specific cleaning --  A visual inspection of CCD-frames reveals bad pixel areas which result from defective sensors. Often these elements produce an abnormally large amount of dark current and are so bright that charge spills over to neighbour elements causing streaking or hot spots. Since the CCD sensors are linked in the vertical direction, the surplus charge will tend to spread along the columns.

Many of these defects are permanent i.e. they appear on every CCD-frame at the same position. Thus the Dark-subtraction should (in principle) remove them. However, this is often not the case since the manifestations of these defects depend on exposure levels and temperature among other things. So after Dark-subtraction a hot spot residual may be present.

A second instrumental fault are the low-sensitivity columns. The origin of cold columns are probably defects in the horizontal shift register which collect and shift the charge after exposure. The DATA of COLD-COLUMNS is NOT LOST. Their pixel values are only lower by a constant value than the ``normal'', neighbouring columns.

The division of the SCIE- by the FLAT-frame doesn't always remove the cold columns. The sky levels of these frames usually do not match, thus the flatfielding gives different ratios for cold- and normal-columns. Even if the sky-background levels agree, cold lines lying over sources won't disappear after FLAT-field correction.

The MIDAS functions discussed above are designed to correct the effects of these cold columns, hot spots and other defects. In the case of cold columns, it is usually possible to recover the data with the MODIFY/COLUMN command using the C option. For the hot spots and other defects, the MODIFY/PIXEL command can be used to replace the bad areas with a best estimate surface. This technique will produce cosmetically clean images, but will not recover the data as the MODIFY/COLUMN does. To use the MODIFY/PIXEL command, the following procedure can be used once a CCD-image has been loaded on the Display monitor:

DRAW/RECTANGLE CURSOR table
where table is the name of table in which to store the start- and end-points of the rectangles. The resulting table is reusable and can be saved for future use. It may be useful to create a set of tables, since the size of the hot spots varies with temperature and exposure time. This table may then be used by the command:
MODIFY/PIXELS inputs output [par3] [par4]
to replace the pixels inside the given rectangles via a 2-dimensional surface interpolation. A $\kappa\times\sigma$-clipping is used to fit a surface to the underlying background which can be the sky or an extended source.

Selecting inputs = ``inframe,intable'' instead of CURSOR leads to the reading of the surface world coordinates x-st,x-end,y-st,y-end for `inframe' from the MIDAS table `intable.' The columns must be labelled XSTART, XEND, YSTART, and YEND.


next up previous contents
Next: Using the COMPUTE Command Up: CCD Detectors Previous: Averaging and Merging Frames
Petra Nass
1999-06-15