This ccd image of cosmic rays is extracted from a set of nine 30 minute darks using mostdev.exe.
Procedure for extracting cosmic ray data:
1. Make D1 through D9 - nine 30 minute darks
2. Make a median all nine darks - M1
3. Subtract M1 from each dark, making a set of images, CR1.fits, CR2.fits .... , which contain only the residuals; ie cosmic ray hits.
4 . Process the CR set with mostdev.exe This is Wolfgang Rentz's "highest absolute deviant combine" operator written by Justin Pryzby
The source code is here: https://fiddlernet.net/svn/libastro/trunk/mostdev.c
If this were a star field image that was to be used for photometry, you could compare the output file from mostdev to one of the images and see if a cosmic ray was on top of any of the stars you were interested in.
The following is how I used mostdev:
Download mostdev.exe into a directory, say "DCR" for "detect cosmic ray hits"
make a subdirectory C:\ DCR\InputFiles and put CR1 through CR9 in there.
On a Windows or DOS machine mostdev.exe is run from a DOS prompt.
Start Menu - Run - "Cmd" This brings up a dos prompt on XP
or: Start Menu - Run - "command" This brings up a dos prompt on non-NT machines (eg Win98)
"CD\" brings up the root directory "cd DCR" brings up the mostdev directory
c:\ DCR > mostdev -o OutputFileName.fits InputFiles\CR*.fits
mostdev will output a .fits image like the one above.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
For each given given pixel position (x, y), look at the values of the
input images at that position. Find the mean in one pass over the
inputs. With a second pass, find the value v which maximizes abs(v-mean)
(there may be duplicities, and there may even be nonuniqueness with
some value a=mean+k and b=mean-k, but I can't see that this is
important). The value v is written to the output image at position
(x, y). In your original context, v would have been some dark -
MedianDark.
Justin