pyfits problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tommy Grav

    #1

    pyfits problem

    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.framewor k/Versions/2.4/lib/
    python2.4/site-packages/pyfits/NP_pyfits.py", line 4645, in getdata
    _data = hdu.data
    File "/Library/Frameworks/Python.framewor k/Versions/2.4/lib/
    python2.4/site-packages/pyfits/NP_pyfits.py", line 2058, in __getattr__
    self.data = np.array(raw_da ta, 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
  • Cygnus X-1

    #2
    Re: pyfits problem

    On Thu, 16 Nov 2006 15:35:00 -0500, Tommy Grav wrote
    (in article <mailman.286.11 63708914.32031. python-list@python.org >):
    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.framewor k/Versions/2.4/lib/
    python2.4/site-packages/pyfits/NP_pyfits.py", line 4645, in getdata
    _data = hdu.data
    File "/Library/Frameworks/Python.framewor k/Versions/2.4/lib/
    python2.4/site-packages/pyfits/NP_pyfits.py", line 2058, in __getattr__
    self.data = np.array(raw_da ta, 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.ope n(datafile)
    self.header=fim g[0].header
    self.image=fimg[0].data

    Tom
    --
    Dealing with Creationism in Astronomy

    cygnusx1@mac.co m
    "They're trained to believe, not to know. Belief can be manipulated.
    Only knowledge is dangerous." --Frank Herbert, "Dune Messiah"

    Comment

    Working...