Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Possible bug in craverage: floating point overflow error

 
Post new topic   Reply to topic    iraf.net Forum Index -> General IRAF
View previous topic :: View next topic  
Author Message
emma
Active IRAF User


Joined: 23 Jan 2006
Posts: 98
Location: Chile

PostPosted: Wed Jul 06, 2011 9:25 pm    Post subject: Possible bug in craverage: floating point overflow error Reply with quote

Hello,

When I run the following command on my linux machine (a "more /etc/redhat-release" gives "Red Hat Enterprise Linux Client release 5.2 (Tikanga)") I have no problems:

Code:

craverage (input="input.fits[SCI,1]", output="" , crmask="input.fits[DQ,1]", average="", sigma="", navg=9, nrej=48, nbkg=11, nsig=25, var0=(readnoise**2), var1=gain, var2=0, crval=8, lcrsig=5, hcrsig=10, crgrow=1, objval=0, lobjsig=10, hobjsig=10, objgrow=0)


where readnoise and gain are variables that have values as defined by the read noise and gain keywords in the header of the input file.

However, when I run the same command on my 10.5.8 macbook I get

Code:

ERROR: floating point overflow


The problem is related to the fact that the image defined by the crmask parameter exists and according to the help is "used to exclude data pixels from the calculations". I believe that this is what is causing the "floating point overflow" error, because if I change the crmask parameter to a file that doesn't exist, craverage successfully completes on both linux and mac and creates an output file as defined by the crmask parameter that contains the locations of the CRs.

Both the linux and mac are using IRAF v2.14.1. I initialised my uparm directory before running craverage in both cases.

I can provide you with an example fits file that can reproduce this problem if required Smile

Many thanks,

Emma Smile
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Wed Jul 06, 2011 9:39 pm    Post subject: Reply with quote

Since it's a data-dependent problem then example FITS files would be required to reproduce it, otherwise there are no known issues with the task. Please upload the files to the anonftp at ftp://iraf.noao.edu/pub and I'll have a look.
Back to top
View user's profile Send private message
emma
Active IRAF User


Joined: 23 Jan 2006
Posts: 98
Location: Chile

PostPosted: Wed Jul 06, 2011 9:48 pm    Post subject: Reply with quote

Awesomely quick response time Very Happy

The file has been uploaded ... I called it test_craverage.fits.gz

Thanks Mike! Smile
Back to top
View user's profile Send private message
emma
Active IRAF User


Joined: 23 Jan 2006
Posts: 98
Location: Chile

PostPosted: Wed Jul 06, 2011 9:58 pm    Post subject: Reply with quote

Sorry Mike, I uploaded the wrong file ... I'm trying to upload a new one (with a different name) but it tells me

Code:

553 Could not create file.


I am using the same commands as before ...
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Wed Jul 06, 2011 9:58 pm    Post subject: Reply with quote

You sure that's the right image? There is only one MEF extension, and it doesn't have a extname/extver. The error message might be bogus, but the problem may just be that there is no SCI or DQ extension in the image.
Back to top
View user's profile Send private message
emma
Active IRAF User


Joined: 23 Jan 2006
Posts: 98
Location: Chile

PostPosted: Wed Jul 06, 2011 10:14 pm    Post subject: Reply with quote

Ok, I got it, it's called test_craverage_new.fits this time Smile
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3257
Location: Tucson

PostPosted: Thu Jul 07, 2011 9:14 am    Post subject: Reply with quote

I'm able to reproduce the problem, but it doesn't look trivial. Since this is Frank's task and he's more familiar with the algorithm I've asked him to take over, unfortunately he is away until next week (when I then leave). Somebody will get back to you, but post back if you don't hear anything. Thanks for the report.
Back to top
View user's profile Send private message
emma
Active IRAF User


Joined: 23 Jan 2006
Posts: 98
Location: Chile

PostPosted: Thu Jul 07, 2011 4:02 pm    Post subject: Reply with quote

That's great, thank you! Smile
Back to top
View user's profile Send private message
valdes
IRAF Guru


Joined: 11 Nov 2005
Posts: 677

PostPosted: Mon Jul 11, 2011 7:19 pm    Post subject: Reply with quote

Hi Emma,

I took a look at your example and I have not yet reproduced it. I am waiting to hear from Mike about how he reproduced the error.

But I wanted to also reply to comment on your usage. Craverage is primarily intended for direct images. It is probably not very appropriate for your spectral data. The cosmic rays outside the orders can be easily identified but they don't really have any impact on the later spectral processing. Within the orders a 2D CR detection method, such as craverage, is not a good choice. In fact in my running of this I see the central ridge line of the left 3 orders are totally being flagged as cosmic rays. As a hint:

Code:
display test_craverage_new.fits[SCI,1] 2 over=test_craverage_new.fits[DQ,1]


For spectral data it is better to detect CRs against the spectral profile if you are extracting to 1D using apextract. If you are doing science on the 2D slit data then it is pretty difficult without a cosmic ray split set of exposures.

So I suggest you think a bit more about how to handle the cosmic rays further downstream in your reductions.

Yours,
Frank Valdes
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> General IRAF All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.59 seconds