Welcome to iraf.net Saturday, April 20 2024 @ 01:25 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Questions about cosmic ray rejection using different routines and a stack of five sub-exposures
   
andrej
 02/17/2015 02:07PM (Read 3450 times)  
+++--
Chatty

Status: offline


Registered: 08/21/2009
Posts: 57
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?

 
Profile Email
 Quote
fitz
 02/24/2015 05:11PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Quick suggestion: Try doing

cl\$this->_split2($m[0]) reset use_new_imt = no

before running the task. This will disable the new image template code and revert to the old code and may solve your problem. If not, post back.

 
Profile Email
 Quote
andrej
 02/27/2015 06:26PM  
+++--
Chatty

Status: offline


Registered: 08/21/2009
Posts: 57
I tried that and it's still not working. So, the command that I use is

xzap inlist=AquariusD01S1FN3.fits outlist=AquariusD01S1FN3xzap.fits statsec=BlankRegion.txt

and the content of BlankRegion.txt is the line:

[320:420,360:460]

(with an extra blank line)


I receive the following output (along with the command line):

xdimsum,\$this->_split2($m[0]) xzap inlist=AquariusD01S1FN3.fits outlist=AquariusD01S1FN3xzap.fits statsec=BlankRegion.txt
The input object mask keyword or list:
The output cosmic ray masks or suffix (.crm):
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)'


I also tried putting a @ symbol before BlankRegion.txt so that the command read

xzap inlist=AquariusD01S1FN3.fits outlist=AquariusD01S1FN3xzap.fits statsec=@BlankRegion.txt

but that gave me a different error message: ERROR: Cannot open file (BlankRegion.txt)

 
Profile Email
 Quote
fitz
 02/27/2015 06:36PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The 'statsec' parameter is declared as a string and is assumed to contain the section string itself, i.e. "[320:420,360:460]" and not a filename with this string.

More specifically, the undefined 'mn' means that the IMSTAT call failed and the local variable 'mn' was never defined. Your "BlankRegion.txt" is being appended to the image name and is the likely cause of the failure.

 
Profile Email
 Quote
   
Content generated in: 0.17 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login