[yt-users] problem writing fits image

John ZuHone jzuhone at gmail.com
Thu Jul 24 14:36:13 PDT 2014


Juan,

That's great! 

Not really anyone besides me as far as I know has used it, so let me know how it works for you.

Best,

John 

On Jul 24, 2014, at 5:35 PM, Juan Camilo Ibanez Mejia <jibanezmejia at amnh.org> wrote:

> Hi Nathan and John,
> 
> that was the problem, now is working fine, thanks.
> 
> 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
> _____________________________
> 
> On Jul 24, 2014, at 11:07 PM, Nathan Goldbaum <nathan12343 at gmail.com> wrote:
> 
>> Hi Juan,
>> 
>> Do you have astropy installed?  This error indicates that python was was unable to import astropy when it imported yt.
>> 
>> -Nathan
>> 
>> 
>> On Thu, Jul 24, 2014 at 2: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
>> 
>> 
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.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/d84d3368/attachment.html>


More information about the yt-users mailing list