Greetings.
I have a stack of five images (each being a two-minute exposure), and I am trying to remove cosmic rays from the images.
Since I have a stack of five images, I tried using imcombine with combine=median, but it still left a faint shadow of the cosmic rays. See the example below:
The second sub-exposure has a clear mark that the other sub-exposures do not have. The median-combined image still has the original artifact, although just not as prominently. I would have expected that combine=median would choose the middle pixel value from the set of 5 (likely not to have a cosmic ray cutting through that location) and thus there shouldn't be any leftover cosmic ray residuals. Did I do something wrong?
Also, I tried using xzap, which in my installation is located at
xdimsum.xzap
and I followed the directions located at
http://www.phy.ohiou.edu/~tss/ASTR410/cosmicrays.html
as closely as possible. I incorporated the "blank" region of the sky as a text file with the single line
[320:420,360:460]
I am trying the routine on "AquariusD01S1FN3.fits" with the default parameters.
The input object mask keyword or list:
The output cosmic ray masks or suffix (.crm):
I left these blank, since I have no idea if I have or need a mask. I then receive the following output:
Creating cosmic ray corrected image AquariusD01S1FN3xzap
Computing image statistics
ERROR: Attempt to access undefined local variable `mn'.
"imean = mn"
line 69: xdimsum$src/iterstat.cl
called as: `iterstat (inlist=AquariusD01S1FN3.fits, statsec=BlankRegion.txt, lower=INDEF, upper=INDEF, nsigrej=3., maxiter=20, show=no)'
"maxiter=maxiter, lower=INDEF, upper=INDEF, show-)"
line 195: xdimsum$src/xzap.cl
called as: `xzap (inlist=AquariusD01S1FN3.fits, outlist=AquariusD01S1FN3xzap.fits, statsec=BlankRegion.txt)'
If I put a @ at the end of the file name for the statsec line, then I get a different error message.
Also, I tried going through the help for xzap, but when I type into the command line
type sdemo.list
I get the following error message:
Warning: Cannot open file (sdemo.list)
[1] Why are the cosmic rays not fully removed from median combine?
[2] How do I get xzap to work?