A new upper-bound spectrum (UBS) method for removal of cosmic spike artifac
ts from spectra or images collected using a charge-coupled device (CCD) det
ector is proposed. This algorithm, which is shown to outperform previous me
thods, relies on an upper-bound spectrum, derived from scaled copies of con
secutively collected spectra, which serves as a threshold for the detection
of suspected cosmic spikes. Detected spikes are removed by replacement wit
h the corresponding points in other spectra. Thus, unlike other commonly us
ed methods, the UBS algorithm requires no smoothing or noise filtering and
more reliably removes cosmic spikes of all magnitudes while introducing far
less (if any) spectral distortion. The UBS method is tested using both syn
thetic and experimental (gypsum and gypsum/hematite mixture) spectra contai
ning variable background (fluorescence), noise, and cosmic spike interferen
ce. The UBS method may in rare instances mistakenly identify spectral noise
or photo-induced changes in band intensity (or shape) as cosmic spikes. Ho
wever, as demonstrated through the use of both synthetic and experimental e
xamples, such misidentifications produce little or no spectral distortion o
r artifacts in the resulting cosmic-spike-free output spectra.