-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Affects-devPRs and issues that do not impact an existing Astropy releasePRs and issues that do not impact an existing Astropy releaseBugio.fits
Description
Recently, we noticed a test failure within SunPy against astropy master.
We have a test that opens a gzipped fits file and makes some adjusts to the data to remove potential bad values. We get that
ValueError: assignment destination is read-only
This seems to only occur for any FITS data that is returned with a astropy.io.fits.hdu.table.BinTableHDU, astropy.io.fits.hdu.image.PrimaryHDU are unaffected by this.
Example would be:
from astropy.io import fits
afile = fits.open('go1520120601.fits.gz') #from https://github.com/sunpy/sunpy/blob/master/sunpy/data/test/go1520120601.fits.gz
print(afile)
#[<astropy.io.fits.hdu.image.PrimaryHDU object at 0x7fbc7c00fc88>,
#<astropy.io.fits.hdu.table.BinTableHDU object at 0x7fbc7c018080>,
#<astropy.io.fits.hdu.table.BinTableHDU object at 0x7fbc7a5975f8>,
#<astropy.io.fits.hdu.table.BinTableHDU object at 0x7fbc7a5a1438>]
afile[1].data[0][0][0][0] = 2
# ValueError: assignment destination is read-only
Is this intended behaviour?
Metadata
Metadata
Assignees
Labels
Affects-devPRs and issues that do not impact an existing Astropy releasePRs and issues that do not impact an existing Astropy releaseBugio.fits