Skip to content

io.fits add ability to efficiently load single extension header #4589

@juliantaylor

Description

@juliantaylor

Currently io.fits/pyfits always loads all extension headers regardless whether one wants them all or not.
At least the obvious api function getheader has this behaviour.

This slows down simple tasks like just checking the primary extension headers keys considerably when the number of extensions is large as it needs to seek through the full file.
Obviously seeking the file is required to load the later extensions but it should only try to read as much as it must to satisfy the users request.

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