Skip to content

Follow irispy-lmsal 0.8.1: NaN outside the bands, Python 3.12 and up - #47

Merged
roytsmart merged 1 commit into
mainfrom
fix/irispy-0.8
Aug 15, 2026
Merged

Follow irispy-lmsal 0.8.1: NaN outside the bands, Python 3.12 and up#47
roytsmart merged 1 commit into
mainfrom
fix/irispy-0.8

Conversation

@roytsmart

Copy link
Copy Markdown
Contributor

What broke

The Python 3.12 test jobs went red yesterday on
test_effective_area[wavelength1-time0], an effective area summing to
NaN, while the same content passed on 3.11. Nothing in this repository
changed between the green run and the red one.

The cause is irispy-lmsal 0.8.1,
uploaded yesterday (2026-08-14) with requires-python >= 3.12:

  • the 3.11 jobs could not install it, resolved an older release, and
    passed
  • the 3.12 jobs picked it up hours after upload and failed

0.8.1 changed get_interpolated_effective_area to return NaN for
wavelengths outside the nominal spectral ranges of the response file
(LM-SAL/irispy@d0872f4), where it used to return a number interpolated
from nothing. Our test grid spans 1300–3000 Å, which is mostly outside
both bands, so its plain sum() went NaN.

What this does

  • Adopts the NaN semantics rather than papering over them. They are
    right for radiance, which divides by the effective area: the old
    extrapolated number silently amplified out-of-band pixels, NaN marks
    them uncalibrated. The docstring documents it, irispy-lmsal>=0.8.1
    asks for it, and a new test pins NaN outside both bands with finite
    answers inside.
  • Drops Python 3.11, following upstream: requires-python >= 3.12,
    test matrix 3.12 and 3.14 (the full dependency chain, including numba
    0.67, declares 3.14 support), Read the Docs bumped from 3.11, which
    could no longer have installed the package at all.

Testing

All 29 tests pass locally against irispy-lmsal 0.8.1, plus black and
ruff. The 3.14 leg runs for the first time in CI on this PR.

Related

The stale clone of irispy-lmsal in the workspace was also updated: the
project moved from GitLab (LMSAL_HUB/iris_hub) to GitHub
(LM-SAL/irispy), and the old remote was a year behind.

🤖 Generated with Claude Code

https://claude.ai/code/session_011q4461XE8hCcZCKsViMQC1

`irispy-lmsal` 0.8.1, released yesterday, changed
`get_interpolated_effective_area` to return NaN for wavelengths outside
the nominal spectral ranges of the response file, where it used to
return a number interpolated from nothing. This is the right behavior
for `radiance`, which divides by the effective area: the old number
amplified whatever was in the out-of-band pixels, while NaN marks them
as uncalibrated. `effective_area` documents the new behavior, a floor of
0.8.1 asks for it, and the tests pin it: a grid reaching far outside the
bands sums over the calibrated wavelengths, and a new test checks NaN
outside both bands with finite answers inside them.

The same release dropped Python 3.11, which is what split CI down the
middle: the 3.11 jobs resolved an old `irispy-lmsal` and passed, while
the 3.12 jobs picked up the day-old release and failed on the NaN. This
package follows: 3.12 is the floor, the test matrix runs 3.12 and 3.14,
and Read the Docs builds with 3.12 rather than the 3.11 that could no
longer install the package at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011q4461XE8hCcZCKsViMQC1
@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (575dcde) to head (52af0ca).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #47   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        16           
  Lines          526       536   +10     
=========================================
+ Hits           526       536   +10     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roytsmart
roytsmart merged commit 233bcf6 into main Aug 15, 2026
11 checks passed
@roytsmart
roytsmart deleted the fix/irispy-0.8 branch August 15, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant