You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.
updating a header key that is integer to double format fails wit pyfits 3.2 and current git head:
import pyfits
print pyfits.__version__
f = pyfits.PrimaryHDU()
f.header['TEST'] = 1
h = pyfits.HDUList()
h.append(f)
h.writeto('test.fits', clobber=True)
del h
del f
f = pyfits.open('test.fits', mode='update')
print type(f[0].header['test'])
print 'assign a float'
f[0].header['test'] = 1.0
print 'new type', type(f[0].header['test'])
output:
3.2.dev
Overwriting existing file 'test.fits'.
<type 'int'>
assign a float
new type <type 'int'>
the type remains integer even though I want a float. A work around is to set it to e.g. 1.0000001 which will then trigger the conversion.
The text was updated successfully, but these errors were encountered:
So basically you want it to show up in the header as 1.0 instead of just 1. That's fairly similar to an issue I recently fixed where True and 1 were treated as identical as well as False/0--clearly wrong. I agree, this should be fixed.
updating a header key that is integer to double format fails wit pyfits 3.2 and current git head:
output:
the type remains integer even though I want a float. A work around is to set it to e.g.
1.0000001
which will then trigger the conversion.The text was updated successfully, but these errors were encountered: