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 }}
Repository navigation
Lazy loading of hdus broke slicing of HDULists #5585
f = fits.open('j94f05bgq_flt.fits')
[ext for ext in f[1:] if ext.header['EXTNAME'] == 'SCI']
[ext.header['CRVAL*'] for ext in f[1:] if ext.header['EXTNAME'] == 'SCI']
The file needs to be read in some way for this to work, e.g.
In [14]: f.info()
In [15]:[ext for ext in f[1:] if ext.header['EXTNAME'] == 'SCI']
Out[15]:
[<astropy.io.fits.hdu.image.ImageHDU at 0x31f0f90>,
<astropy.io.fits.hdu.image.ImageHDU at 0x3407890>]
Activity
eteq commentedon Dec 11, 2016
@embray - do you understand what's going on here? That's a pretty serious incompatible change, and I suspect it isn't what was intended?
Handle slices passed to __getitem__ when some HDUs have not been loaded
mwcraig commentedon Dec 11, 2016
@nden -- I believe this has been fixed in #5589. Can you give it a try?
[-]Lazy loading of hdus broke functionality[/-][+]Lazy loading of hdus broke slicing of HDULists[/+]Handle slices passed to __getitem__ when some HDUs have not been loaded