Skip to content

OVIRS part2 notebook fails: FITS HDU index out of range due to data structure change #97

@jordanpadams

Description

@jordanpadams

🐛 Describe the bug

ovirs/part2/find-data-standalone.ipynb fails with IndexError: list index out of range when accessing hdul[2].data. The notebook assumes FITS files have at least 3 HDUs (indices 0, 1, 2), but the actual files retrieved from the PDS do not match this structure.

The notebook already contains a comment acknowledging a version discrepancy between the registry (v10.0) and the SBN node (v11.0), suggesting the data structure has changed.

🕵️ Expected behavior

Notebook reads OVIRS FITS files and produces spectral plots for each detector.

📜 To Reproduce

  1. Install requirements-sbn.txt
  2. Run notebooks/discipline/sbn/ovirs/part2/find-data-standalone.ipynb
  3. Cell plotting hdul[2].data[0, i, :] raises IndexError: list index out of range

⚙️ Fix

Inspect the actual HDU structure of currently available OVIRS FITS files (e.g., print(hdul.info())) and update the HDU index and array slicing to match the current data format.

🖥 Environment Info

  • astropy~=7.2.0, Python 3.13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    ToDo

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions