[AstroPy] FITS image data dtype

Miguel de Val-Borro miguel.deval at gmail.com
Wed Jul 17 11:56:12 EDT 2013


I have some FITS images that are read with pyfits 3.0.8 and a dtype of
'>f8'. However I am using an AMD processor and I find some problems when
handling the data.  I have tried to swap the data byte order and the
dtype using:

>>> map = hdulist[1].data.byteswap().newbyteorder()
>>> print map.dtype

Then the resulting array seems to be fine. Is this what needs to be
done, and why is pyfits not swapping to the little-endian type based on
the system architecture?


More information about the AstroPy mailing list