By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,985 Members | 1,574 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,985 IT Pros & Developers. It's quick & easy.

pyfits problem

P: n/a
I am trying to load in a fits-image and get this error

wiyn05dec/n1 -display -i obj062.fits
Traceback (most recent call last):
File "/Users/tgrav/Work/Astronomy/MyCode/Python/Redspit/
display.py", line 48, in ?
main()
File "/Users/tgrav/Work/Astronomy/MyCode/Python/Redspit/
display.py", line 30, in main
im = pyfits.getdata(options.infname)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/pyfits/NP_pyfits.py", line 4645, in getdata
_data = hdu.data
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/pyfits/NP_pyfits.py", line 2058, in __getattr__
self.data = np.array(raw_data, type=np.Float32)
AttributeError: 'module' object has no attribute 'Float32'

I am using numpy 1.0rc3 and ActivePython 2.4.3 Build 11.
Anyone know what is going on?

Cheers
Tommy
Nov 16 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Thu, 16 Nov 2006 15:35:00 -0500, Tommy Grav wrote
(in article <ma**************************************@python.o rg>):
I am trying to load in a fits-image and get this error

wiyn05dec/n1 -display -i obj062.fits
Traceback (most recent call last):
File "/Users/tgrav/Work/Astronomy/MyCode/Python/Redspit/
display.py", line 48, in ?
main()
File "/Users/tgrav/Work/Astronomy/MyCode/Python/Redspit/
display.py", line 30, in main
im = pyfits.getdata(options.infname)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/pyfits/NP_pyfits.py", line 4645, in getdata
_data = hdu.data
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/pyfits/NP_pyfits.py", line 2058, in __getattr__
self.data = np.array(raw_data, type=np.Float32)
AttributeError: 'module' object has no attribute 'Float32'

I am using numpy 1.0rc3 and ActivePython 2.4.3 Build 11.
Anyone know what is going on?

Cheers
Tommy
Have you opened the file? Which version of pyFITS?

Consider:
fimg=pyfits.open(datafile)
self.header=fimg[0].header
self.image=fimg[0].data

Tom
--
Dealing with Creationism in Astronomy
http://homepage.mac.com/cygnusx1
cy******@mac.com
"They're trained to believe, not to know. Belief can be manipulated.
Only knowledge is dangerous." --Frank Herbert, "Dune Messiah"

Nov 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.