Artifacts

Depending on the available data different methods are applied to detect and correct gross errors in the data. When only one frame is available artifacts are identified by their appearance; they are normally very sharp features. Most filter techniques assume that the image is oversampled so that the values in any region of a given small size can be regarded as taken from a random distribution. If the image is undersampled (i.e. the point spread functions is unresolved) it is impossible to distinguish between real objects and gross errors.

For a well sampled frame *f*_{i,j} non-linear digital filters are used
giving the resulting frame *r*_{i,j} :

where is a local estimate for

To avoid this problem more stable estimators are preferred such as the mode or median. Since the mode may neither exist nor be uniquely defined, the median is normally used (Tukey, 1971). The median filter can only detect artifacts if they occupy less than half of the filter size. Therefore, its size must be larger than two times the largest defect which should be removed and smaller than the smallest object to be preserved.

Another group of non-linear filters is based on recursive filters
which uses the already filtered values for the estimator .
In
the one dimensional case a frame *f*_{i} is transformed to :

where

The main advantage of this filter type, compared to the median filter, is its capability to remove artifacts larger than its own size. Figure 2.1 shows a CCD dark current exposure with cosmic ray events. It can be seen that all artifacts can be removed using either a large median filter or a recursive filter while small median filters are unable to remove the larger events. When real features are present such as spectra in Figure 2.2 the non-linear filters may modify spectral lines.

When more than two images of the same region are available, it is
possible to compare the stack of pixels from the different exposures.
The frames must be aligned and intensity calibrated before a
comparison can be performed. Artifacts become more difficult to
detect if an alignment, hence rebinning, is needed due to its
smoothing effect. Thus, the stacking technique is best suited for
removing cosmic ray events and electronic disturbances. Statistical
weights must also be assigned to the individual images depending on
exposure and signal-to-noise ratio. Outliers in the stack of pixel
values are rejected either by comparing them to the median or by
applying
-clipping techniques (Goad, 1980). The
resulting frame is then the mean of the remaining values. A set of
CCD images of the galaxy A0526-16 are shown in Figure 2.3
including the resulting stacked image. By having different origins of
the galaxy in the exposures the chip artifacts could also be removed.
For comparison with non-linear filter techniques,
Figure 2.2D shows removal of cosmic ray events from
the spectral frame discussed above.