Skip to content

Lazy loading of hdus broke slicing of HDULists #5585

Closed

Description

@nden

I think #5065 broke operations like this:

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

  1. eteq commented on Dec 11, 2016

    @eteq
    Member

    @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?

  2. added a commit that references this issue on Dec 11, 2016
    daa1c43
  3. mwcraig commented on Dec 11, 2016

    @mwcraig
    Member

    @nden -- I believe this has been fixed in #5589. Can you give it a try?

  4. changed the title [-]Lazy loading of hdus broke functionality[/-] [+]Lazy loading of hdus broke slicing of HDULists[/+] on Dec 12, 2016
  5. added a commit that references this issue on May 24, 2017
    18b6ba6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions