jdahlstrom1 |
12/21/2010 11:03PM (Read 7862 times)
|
|
|
Status: offline
Registered: 12/21/2010
Posts: 5
|
Hi,I have run into a snag in using 'cosmicrays' in the new IRAF 2.15 and the "macintel" 64-bit Mac OS X download. If I attempt to run 'cosmicrays' on a 2048 x 2048 FITS image in interactive mode, the task fails with a "segmentation violation". However, if I run it *not* in interactive mode, the task runs successfully (albeit with less than optimal CR removal, due to not being able to tweak parameters). I am using a dual quad-core Mac Pro running OS 10.6.5 and a 64-bit kernel. uname -m returns x86_64 and 'show arch' returns .macintel.Any tips?
|
|
|
|
fitz |
12/21/2010 11:03PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
This appears to be a real bug in the code and would affect all platforms. I've asked Frank to have a look to make sure I've made the right fix and to post the buglog, but for the moment you can get a patched binary fromftp://iraf.noao.edu/iraf/v215/support/x_crutil.e.MACINTELDownload in binary mode, make it executable and install in noao$bin.macintel as x_crutil.eThanks for the report and let us know if the problems continue.
|
|
|
|
jdahlstrom1 |
12/21/2010 11:03PM
|
|
|
Status: offline
Registered: 12/21/2010
Posts: 5
|
Thanks for the quick reply! I have installed the patched executable, which does indeed operate in interactive mode. However, I do seem to have an issue in finding proper parameter settings; the old ones that I have used successfully for the last 10 years on 32-bit platforms in IRAF 2.12 and earlier no longer seem to work. It is as though virtually all real data points are marked as CR candidates and then sadly removed, and no amount of tweaking seems to alter the fundamental behavior.I am not sure if this problem is arising from a 64-bit conversion issue, a bug, or simple operator error (which I have double and triple-checked, as well as done "unlearn" several times). Do you have any insights?
|
|
|
|
fitz |
12/21/2010 11:03PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
This is partly why I asked Frank to also have a look. The task does some clever things in passing pointers around so the obvious 64-bit changes that are required aren't always obvious, but this could just be a matter of setting appropriate parameters for your data.Note the older CRUTIL external package is still available from ftp://iraf.noao.edu/iraf/extern/ To use this you would need to install the package (you can use the 32-bit 'redhat' binaries as is) and then be sure you're loading the CRUTIL external package and not the one built into the system. Alternatively, you could install the 32-bit 'macosx' binaries as well, then set an 'IRAFARCH' environment variable to 'macosx' before starting the CL to use the 32-bit binaries. If the task still misbehaves then it isn't a 64-bit issue, if it goes back to working the way it always has in the past then more changes to the 64-bit version may be needed.
|
|
|
|
jdahlstrom1 |
12/21/2010 11:03PM
|
|
|
Status: offline
Registered: 12/21/2010
Posts: 5
|
Hi,It has taken awhile to look into this problem more fully, but I think I have concluded that there is definitely something amiss with cosmicrays in the 2.15 IRAF release, though I cannot tell if it is a 64-bit issue or not. I have been testing cosmicray rays on identical echelle spectrum images one on my trusty old dual 2.5 GHz G5 mac running IRAF 2.12.2 and OS 10.4.11 and the other on my lovely new dual-quad core 2.4 GHz MacPro running OS 10.6.5 and the 64-bit release of IRAf 2.15. I use identical parameters for cosmicrays, but the results are VASTLY different. Cosmicray parameters (relevant):
(thresho= 20.) Detection threshold above mean
(fluxrat= 8.) Flux ratio threshold (in percent)
(npasses= 7) Number of detection passes
(window = 5) Size of detection window
G5 results: CRCOR = 'Threshold= 20.0, fluxratio= 8.00, removed=414'Intel results: CRCOR = 'Threshold= 20.0, fluxratio= 8.00, removed=53715'G5 screen capture of interactive cosmicray session and cross-aperture cut through resulting spectrum:
[img:5becaa6910]http://personal.carthage.edu/jdahlstrom1/images/G5_cr.png[/img:5becaa6910]
[img:5becaa6910]http://personal.carthage.edu/jdahlstrom1/images/G5_crosscut.png[/img:5becaa6910]Intel screen captures of cosmicray session and cross-aperture cut:
[img:5becaa6910]http://personal.carthage.edu/jdahlstrom1/images/intel_cr.png[/img:5becaa6910]
[img:5becaa6910]http://personal.carthage.edu/jdahlstrom1/images/intel_crosscut.png[/img:5becaa6910]Mind you, this is the same, identical image used in both cosmicray runs. I verified it by visual inspection. Notice how many more candidates are identified in the intel run, and how different the parameter space looks. Something very different is happening to generate these plots, yet nominally, it is as close to being the same as I can make it on the two platforms.Even when I change the rejection parameters a LOT for the intel mac, (rejection threshold=20,000, for example), the result is still for virtually all data to be thrown away despite only a few tens of "candidates" are identified for rejection. Very strange!Something is clearly amiss. I would like to be able to test whether this is a 32-bit versus 64-bit IRAF issue, but I cannot get the 32-bit "macosx" binaries to install (actually, they install, but I cannot induce IRAF to use them on the new machine, no matter how many forcible attempts I make through artful alterations of the install script, manual symbolic linking, etc). The redhat binaries fail to execute altogether when crutil is installed as a separate package.Thanks for your help in getting to the bottom of this problem. In the meanwhile, I guess I will not be retiring my old war horse quite yet.
|
|
|
|
fitz |
12/21/2010 11:03PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
[quote:7384000230]
Something is clearly amiss. I would like to be able to test whether this is a 32-bit versus 64-bit IRAF issue, but I cannot get the 32-bit "macosx" binaries to install (actually, they install, but I cannot induce IRAF to use them on the new machine, no matter how many forcible attempts I make through artful alterations of the install script, manual symbolic linking, etc). The redhat binaries fail to execute altogether when crutil is installed as a separate package. [/quote:7384000230]I will have to rely on Frank to reply about possible task problems, but on this last point..... As long as you have *both* the macosx and macintel binaries installed, choosing between them in v2.15 is a matter of setting the 'IRAFARCH' environment variable before logging into the CL, e.g.[code:1:7384000230]
% setenv IRAFARCH macosx
% cl
[/code:1:7384000230]On a system where macintel is the default, the above should run the macosx binaries (you can verify this with a 'cl> show arch" or a 'ps' command outside the CL). There is a combined OSX binary distribution available that has all the needed pieces, or you can get the individual binaries (i.e. the older IB and NB distribution files) and install them manually. This is how the test release was distributed, specifically so one could compare results from the 32/64-bit binaries by simply switching the IRAFARCH setting. If you still have problems with this, please post back.
|
|
|
|
jdahlstrom1 |
12/21/2010 11:03PM
|
|
|
Status: offline
Registered: 12/21/2010
Posts: 5
|
Hi,Thanks for the tip on the setenv IRAFARCH. I could swear that I had done just what you suggested, but it worked this time. And the good (or perhaps bad?) news: the 32 bit version of cosmicrays worked exactly as it had done in the past. So this is indeed a 64-bit issue, or so it would seem.Thanks again for your help, and I will watch for more news on updates to the 64-bit binaries. Julie
|
|
|
|
fitz |
12/21/2010 11:03PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
I'm back in the office and talked to Frank: My earlier fix was incorrect but Frank spotted another change that would explain both the original error and what you're seeing now. I've updated the fixed binary atftp://iraf.noao.edu/iraf/v215/support/x_crutil.e.MACINTELPlease download and install this again to see if it fixes the problem. If so I'll prepare a linux64 version as well since this should also affect that platform.-Mike
|
|
|
|
jdahlstrom1 |
12/21/2010 11:03PM
|
|
|
Status: offline
Registered: 12/21/2010
Posts: 5
|
Yes, that did the trick! Now up and running on 64-bit.Thanks a lot for your help!
|
|
|
|
astropunkin |
03/06/2014 03:43PM
|
|
|
Status: offline
Registered: 06/25/2010
Posts: 18
|
Hello!
I am running into this problem now on Ubuntu 12.04 64-bit but I am running IRAF v2.16. Do I need to install this patch or am I having a different problem all together?
Thank you in advance for your help!
|
|
|
|
fitz |
03/06/2014 03:47PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
If you're running v2.16 then you have the above patch but this might be something new. Could you upload some sample data and the parameters you used (e.g. "cl\$this->_split2($m[0]) dpar cosmicrays") to the anonymous ftp at ftp://iraf.noao.edu/pub so we can try to reproduce the problem? Thanks.
|
|
|
|
astropunkin |
03/06/2014 03:55PM
|
|
|
Status: offline
Registered: 06/25/2010
Posts: 18
|
It does create an output file but I can't open it bc it is corrupt.
PACKAGE = crutil
TASK = cosmicrays
input = z0127.HCG40-1219_hgar.fits List of images in which to detect cosmic rays
output = crz0127.HCG40-1219_hgar.fits List of cosmic ray replaced output images (optio
(crmasks= ) List of bad pixel masks (optional)
(thresho= 10.) Detection threshold above mean
(fluxrat= 3.) Flux ratio threshold (in percent)
(npasses= 5) Number of detection passes
(window = 5) Size of detection window
(interac= yes) Examine parameters interactively?
(train = no) Use training objects?
(objects= ) Cursor list of training objects
(savefil= ) File to save train objects
(plotfil= ) Plot file
(graphic= stdgraph) Interactive graphics output device
(cursor = ) Graphics cursor input
answer = yes Review parameters for a particular image?
(mode = ql)
I am uploading the file now to the ftp site.
|
|
|
|
astropunkin |
03/06/2014 03:59PM
|
|
|
Status: offline
Registered: 06/25/2010
Posts: 18
|
It is there!
Thank you for responding so quickly!
|
|
|
|