Abstract: | This article describes a novel algorithm for cosmic‐ray rejection in single spectroscopic CCD images. This algorithm is based on a variation of template matching. It focuses on identifying those pixels belong to spectra, while other conventional algorithms tried to locate the cosmic‐ray hits directly. The main principle is applying template matching to find suspicious blocks, which is followed by surface patching to locate the legitimate pixels accurately. Therefore, the rest pixels are the ones corrupted by cosmic‐ray hits. Meanwhile, almost all the parameters are automatically extracted from the images. Examples of its performance are given for both simulated and observed images. It shows an advantage of significantly low false alarm rate with relatively high detection rate (© 2009 WILEY‐VCH Verlag GmbH & Co. KGaA, Weinheim) |