astropy: FITS I/O bug
Am pretty sure the following represent a bug in the FITS I/O, but am not certain. The failing code is below. The write statement works and the read fails with an:
IOError : Header missing END card.
dum = np.empty((5,100), dtype=[('w','>f8'),('f','>f4')])
prihdu = fits.PrimaryHDU()
tblhdu = fits.BinTableHDU(dum, name='DATA’)
hdulist = fits.HDUList([prihdu, tblhdu])
hdulist.writeto('file.fits', clobber=True) # Does not fail
tmp = fits.open('file.fits') # Fails
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 16 (10 by maintainers)
Commits related to this issue
- FITS I/O bug #4580 — committed to AMAN3003/astropy by AMAN3003 11 years ago
- fix for FITS I/O bug #4580 — committed to AMAN3003/astropy by AMAN3003 11 years ago
- fix for FITS I/O bug #4580 — committed to AMAN3003/astropy by AMAN3003 11 years ago
- FITS I/O bug #4580 — committed to AMAN3003/astropy by AMAN3003 11 years ago
- fix for FITS I/O bug #4580 — committed to AMAN3003/astropy by AMAN3003 11 years ago
- fix for FITS I/O bug #4580 — committed to AMAN3003/astropy by AMAN3003 11 years ago
I don’t know exactly when behavior changed but as of astropy 6.0.1, OP’s script tracebacks as
It seems that we’re de-facto not accepting the ill-formed input array anymore (good !), so maybe all we need now is a slightly clearer error message. @saimn @astrofrog do you think that’d be sufficient to close this issue ?