[AstroPy] unexpected pyfits behavior float32 converted to float64

Jim Vickroy jim.vickroy at noaa.gov
Tue May 8 12:59:25 EDT 2012


Hi Pyfits users,

Consider:

 >>> import pyfits
 >>> pyfits.__version__
'3.0.5'
 >>> path = ...
 >>> HDUs = pyfits.open (path,mode='readonly')
 >>> HDUs['primary'].header['bitpix']
32
 >>> HDUs['primary'].data.dtype
dtype('float64')
 >>> HDUs['primary'].header['bitpix']
-64
 >>>

Why is the conversion from 32 to 64 bit floats silently occurring?  How 
can I prevent it?

Thanks,
-- jv




More information about the AstroPy mailing list