Welcome to iraf.net Saturday, April 20 2024 @ 11:45 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Corruption when reading 64-bit images on OSX
   
jturner
 09/04/2012 08:10PM (Read 3869 times)  
+++++
Active Member

Status: offline


Registered: 12/29/2005
Posts: 165
Long time no post...With IRAF 2.15 and 2.16 and the "macosx" binaries, I'm getting incorrect values when reading double-precision images, corrupting subsequent processing. I can reproduce the problem simply by doing this:
[code:1:652f259940]imarith dev$pix + 0.0 test.fits pixtype="double"; imstat test[/code:1:652f259940]
... which returns all zeros.Any ideas what needs fixing? I'm seeing this on 10.5, 10.6 & 10.7.Thanks,James.

 
Profile Email
 Quote
fitz
 09/04/2012 08:10PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
This bug was already fixed for macintel systems in Feb 2011 but the code change didn't get copied into the IEEE sources being used when building macosx. I've fixed this for the next update. Until then, you can copy the 'ieee*' files from the unix$as.macintel directory to unix$as.macosx, delete the bin$libvops.a library and then do a "make update" to rebuild the system.

 
Profile Email
 Quote
jturner
 09/04/2012 08:10PM  
+++++
Active Member

Status: offline


Registered: 12/29/2005
Posts: 165
Hi Mike,Thanks for that info. -- but after doing what you said I still get the same results (all zeros) as before Frown.I was careful to make sure I'm picking everything up from the same clean IRAF install etc. The libvops did get regenerated successfully, including the ieee stuff. I tried deleting libex.a and x_images.e as well, before repeating the "make update", but that didn't make any difference either, so I think this must be a different bug?Any more ideas?Thanks!James.

 
Profile Email
 Quote
fitz
 09/04/2012 08:10PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Probably just means the build didn't actually work for some reason, but I can promise you the bug is fixed on my machine with the fix:[code:1:0faf149562]vocl> imarith dev$pix + 0.0 test.fits pixtype="double"; imstat test
# IMAGE NPIX MEAN STDDEV MIN MAX
test 262144 108.3 131.3 -1. 19936.
vocl> show arch
.macosx
[/code:1:0faf149562]I've put the binary for this atftp://iraf.noao.edu/pub/x_images.e.MACOSX

 
Profile Email
 Quote
jturner
 09/04/2012 08:10PM  
+++++
Active Member

Status: offline


Registered: 12/29/2005
Posts: 165
Thanks for the binary, which does work for me. I would also like to fix our source installation, however, and I think there must be some difference between my machine and yours, since I still get zeros from imstat after replacing ieee.gx, ieeer.x and ieeed.x and successfully rebuilding the binaries (even when I build everything starting from sources without any binaries). Is it possible that you replaced any other source files apart from those 3? I see zsvjmp.s is also different between macosx and macintel, but copying that too doesn't seem to help. My machine is 10.6 and I have gcc 4.2.1. If you have any other ideas I'd appreciate them!James.

 
Profile Email
 Quote
fitz
 09/04/2012 08:10PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Be sure you deleted the libvops.a from iraf$bin.macosx, not the symlink in iraf$lib. Also be sure that the system is reconfigured for the 'macosx' architecture, specifically that iraf$unix/as is a symlink pointing to the as.macosx directory. After you double-check that the as.macosx versions of ieeed.x and ieeer.x are the same as what's in as.macintel, you should see the following in the spool file when building the system:[code:1:6f8c9c735b]
:
check out file `ieeer.x = /iraf/iraf/unix/as/ieeer.x'
check out file `ieeed.x = /iraf/iraf/unix/as/ieeed.x'
:
[/code:1:6f8c9c735b]These are the lines where the IEEE files are checked out of the as directory and so the $iraf and $iraf/unix/as links must be correct.Otherwise I can post the updated libvops.a or you can send me your spool file. I'm positive my system is different than yours, but I'm equally sure this is the only code change that affects this bug.

 
Profile Email
 Quote
jturner
 09/04/2012 08:10PM  
+++++
Active Member

Status: offline


Registered: 12/29/2005
Posts: 165
Thanks. I did all of those things and I do see the ieee check out lines, so I'll email you my spool file.One thing I notice is a "/bin/bash: setenv: command not found" near the start of the build. Although my login shell is bash, I was running tcsh at the time and using an unmodified IRAF (except for one extra line in mkpkg.inc so I don't need root to put iraf.h in /usr/include), so I'm not sure why bash was getting invoked. Anyway, the build seemed to work, apart from a few warnings, but the imstat results haven't changed (and yes, "show iraf" does show "/iraf/iraf/").James.

 
Profile Email
 Quote
fitz
 09/04/2012 08:10PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
I had another look, starting with the latest public iraf-macosx.tar.gz file, and indeed I forgot a step: The definition of 'IOFF' in the as$ieee.gx file needs to be changed from 1 to 2 for the double-precision type. When you rebuild the libvops.a be sure 'generic' is run on the ieee.gx to rebuild the ieeer.x and ieeed.x files or else just manually change ieeed.x as well.Since you've already copied the as.macintel files this simple change should fix it.

 
Profile Email
 Quote
jturner
 09/04/2012 08:10PM  
+++++
Active Member

Status: offline


Registered: 12/29/2005
Posts: 165
Excellent. Thanks for persisting a bit with that. I'll try it again on Monday (unless my baby is born in the meantime...).James.

 
Profile Email
 Quote
jturner
 09/04/2012 08:10PM  
+++++
Active Member

Status: offline


Registered: 12/29/2005
Posts: 165
Great, that seemed to sort it out.Thanks for your help,James.

 
Profile Email
 Quote
   
Content generated in: 0.36 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