[AstroPy] FITS image data dtype
Miguel de Val-Borro
miguel.deval at gmail.com
Wed Jul 17 15:24:27 EDT 2013
On Wed, Jul 17, 2013 at 12:14:16PM -0400, Erik Bray wrote:
> FITS files store arrays in big-endian order natively. Actually swapping the
> bytes to native order can be costly, especially when the data is being accessed
> by way of an mmap'd file (the default in PyFITS 3.1 and up). And it's generally
> unnecessary when working within Numpy--it is only necessary if passing those
> bytes to other software that is expecting values in native byte order.
The matplotlib function imshow shows the original map differently than
after swapping the byte order to little-endian format.
If I remember correctly I also had problems with numpy array operations
on the maps with the '>f8' dtype for this kind of image data.
More information about the AstroPy