Follow irispy-lmsal 0.8.1: NaN outside the bands, Python 3.12 and up - #47
Merged
Conversation
`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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What broke
The Python 3.12 test jobs went red yesterday on
test_effective_area[wavelength1-time0], an effective area summing toNaN, 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-lmsal0.8.1,uploaded yesterday (2026-08-14) with
requires-python >= 3.12:passed
0.8.1 changed
get_interpolated_effective_areato return NaN forwavelengths 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
right for
radiance, which divides by the effective area: the oldextrapolated number silently amplified out-of-band pixels, NaN marks
them uncalibrated. The docstring documents it,
irispy-lmsal>=0.8.1asks for it, and a new test pins NaN outside both bands with finite
answers inside.
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