[yt-users] problem writing fits image
John ZuHone
jzuhone at gmail.com
Thu Jul 24 14:09:41 PDT 2014
Hi Juan,
This only works if you have installed AstroPy in the Python that yt uses. If you installed from the install script, you can use "pip install astropy".
There should probably be a more sensible error message than the one you got, I'll set about fixing it shortly.
Best,
John
On Jul 24, 2014, at 5:03 PM, Juan Camilo Ibanez Mejia <jibanezmejia at amnh.org> wrote:
> 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
>
> Research Scholar
> Department of Astrophysics
> American Museum of Natural History
> +1-212-313-7435
> jibanezmejia at amnh.org
> _____________________________
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140724/6c9ea80e/attachment.htm>
More information about the yt-users
mailing list