Next: Slitless Multiobject Spectroscopy with FOSC Type Instruments
Up: Applications
Previous: A Posteriori Guidance for Astronomical Images
Table of Contents -- Index -- PS reprint -- PDF reprint


Astronomical Data Analysis Software and Systems VII
ASP Conference Series, Vol. 145, 1998
Editors: R. Albrecht, R. N. Hook and H. A. Bushouse

Recognition of Anomalous Events

S. Monai1,2 and F.Pasian2
1Osservatorio Astronomico di Brera Merate, Italy
2Osservatorio Astronomico di Trieste, Italy

 

Abstract:

We present an original algorithm for the recognition of anomalous events in a CCD frame (i.e., cosmic hits, bad pixels etc.). The algorithm is able to distinguish between these events and real features by comparing the standard deviation and the kurtosis of a synthetic PSF, whose width is given by the user, and the corresponding values in a running window, whose size is chosen by the user, in the actual frame. The anomalous pixels are therefore filtered with a neighbourhood average.

     

Raw images, as read from a CCD, are often affected by some events which are revealed by anomalous pixel values, i.e., single saturated pixels or pixels at zero intensity (also named hot or bad pixels). Often cosmic rays cross the CCD during the exposure and are revealed as strange features normally affecting a few contiguous pixels. It is not always simple to disentangle automatically these features. Among the approaches to this recognition problem we have: - IRAF tasks cosmicrays; - MIDAS task filter/cosmic; - a locally adaptive modified Haar transform approach due to Richter (1991) and Richter et al. (1991); - a median filter approach due to Meurs et al. (1991) and van Moorsel (1991); - a method using filters based on ordered statistics (Pasian 1991); - an image restoration, followed by flagging badly restored ``objects" as bad pixels, and re-restoring (Weir 1991), this last allows the addition of a point spread function (PSF) fitting, coupled with the flagging of poorly restored ``objects"; - a three step procedure is used by Yee et al. (1996).

In this work we make only one reasonable assumption about this kind of events: The anomalous events are smaller than the actual PSF of the instrument. This is not always true, but if this is the case we think there are no classic criteria, affordable by a classical algorithm, to distinguish these events (different approaches are those of Priebe et al. (1993) and Murtagh (1994), both use object recognition techniques).

When the previous assumption is true (by far the great majority of cases) we have the possibility to establish some precise criteria to identify, and filter, the anomalous events, without affecting the real features (which are normally degraded by a normal filtering technique). First of all we must know the PSF width in pixel units, and this is not very difficult both for imaging and spectroscopical observations. A Gaussian fit across a star or an emission line is sufficient to determine the actual PSF width (the seeing normally prevents us to see the true diffraction pattern). With this datum we are able to compute two important parameters: the standard deviation and the kurtosis in a window centered on a synthetic PSF (the window width is chosen by the user). The first parameter allows recognition of events having an anomalous intensity variation across the specified window, while the second recognizes the event's shape which must have a profile narrower than the PSF (i.e., a greater kurtosis). The standard deviation of the real image derives from the signal variations across the feature plus the image noise; the deviation factor from the corresponding synthetic PSF must be chosen appropriately. This parameter must therefore be tuned: after several experiments on different images and spectra taken with different instruments, we suggest a deviation factor of at least 5. With these criteria we are confident not to identify as anomalous a real feature. When in a window the standard deviation is more than 5 times greater and the kurtosis is larger than the corresponding values of the PSF, the central pixel is identified as anomalous, its coordinates are stored and we can substitute taking twice the average value of its neighbours.

We want to stress that only the contemporaneous satisfaction of both requirements allows us to identify an anomalous event; in fact a large kurtosis alone doesn't mean a narrower profile since the condition is necessary but not sufficient. The double averaging step is necessary because some events could be spread over more than one pixel and a simple filtering could not remove the anomalies, with a second iteration we are averaging the already filtered pixels and we are quite sure to eliminate completely the anomaly. If the anomalous event is spread along more than the window's width (but only in one direction) the algorithm still recognizes it but the neighbour average could not remove it completely. In this case the entire procedure should be repeated once more.

Acknowledgments:

We are grateful to Dr. M. Nonino for having offered the image of the Seyfert galaxy. This work has been carried out thanks to a grant of the ``Oss. Astron. di Brera Merate" for the realisation of the Data Reduction Software for the DOLORES instrument, in the framework of the TNG project.

References:

Meurs E.J.A., Bonifacio V.H., & Lima N.M. 1991, in 3rd ESO/ST-ECF Data Analysis Workshop, 45

Pasian F. 1991, in 3rd ESO/ST-ECF Data Analysis Workshop, 57

Priebe A., Liebscher E., Lorenz H., & Richter G.M. 1993, in Astronomical Data Analysis Software and Systems II, ASP Conf. Ser., Vol. 52, eds. R.J. Hanisch, R.J.V. Brissenden, & J. Barnes (San Francisco, ASP), 442

Richter G.M. 1991, in 3rd ESO/ST-ECF Data Analysis Workshop, 37

Richter G.M., Boehm P., Lorenz A., & Capaccioli M. 1991, Astron. Nach. 312,345

van Moorsel G. 1991, ST-ECF Tech. Rep

Weir N. 1991, in 3rd ESO/ST-ECF Data Analysis Workshop, 115

Yee H.K.C., Ellingson E., & Carlberg R.G. 1996, Ap. J. Supp. Ser. 102,269


 
Figure 1: Assonometric projection of a raw image
\begin{figure}
\epsscale{0.3}
\plotone{monais_1.eps}\end{figure}


 
Figure 2: Assonometric projection of the cleaned image
\begin{figure}
\epsscale{0.3}
\plotone{monais_2.eps}\end{figure}


 
Figure 3: Assonometric projection of the residuals
\begin{figure}
\epsscale{0.3}
\plotone{monais_3.eps}\end{figure}


 
Figure 4: The cross-cut of a cosmic hit filtering steps
\begin{figure}
\epsscale{0.3}
\plotone{monais_3.eps}\end{figure}


© Copyright 1998 Astronomical Society of the Pacific, 390 Ashton Avenue, San Francisco, California 94112, USA


Next: Slitless Multiobject Spectroscopy with FOSC Type Instruments
Up: Applications
Previous: A Posteriori Guidance for Astronomical Images
Table of Contents -- Index -- PS reprint -- PDF reprint

payne@stsci.edu