[yt-users] problem writing fits image

Juan Camilo Ibanez Mejia jibanezmejia at amnh.org
Thu Jul 24 14:03:55 PDT 2014


Dear yt users,

I was trying to generate a FITS file from one of my simulations but I obtained an error I
do not understand and do not know how to solve. I followed the procedure in:
http://yt-project.org/docs/dev-3.0/visualizing/writing_fits_images.html
and in the moment I call fib = FITSImageBuffer(cvg, fields=["density"])
I obtain the error:


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-87-25a548a040e2> in <module>()
----> 1 fib = FITSImageBuffer(cvg, fields=["density"])

/home/jcibanezm/codes/yt30/yt-x86_64/src/yt-hg/yt/utilities/fits_image.pyc in __init__(self, data, fields, units, center, scale, wcs)
    104                 mylog.info("Making a FITS image of field %s" % (key))
    105                 if first:
--> 106                     hdu = pyfits.PrimaryHDU(np.array(img_data[key]))
    107                     first = False
    108                 else:

AttributeError: 'NoneType' object has no attribute 'PrimaryHDU'


Any idea how can I solve this ?

thanks in advance

Juan

_____________________________
Juan Camilo Ibañez Mejia
PhD candidate in physics
Institute für Theoretische Astrophysik
Heidelberg University
jibanez at zah.uni-heidelberg.de<mailto:jibanez at zah.uni-heidelberg.de>

Research Scholar
Department of Astrophysics
American Museum of Natural History
+1-212-313-7435
jibanezmejia at amnh.org<mailto:jibanezmejia at amnh.org>
_____________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140724/ca04561e/attachment.htm>


More information about the yt-users mailing list