Skip to content

Forward axis_wavelength from image() through measure() to expose()#178

Merged
jacobdparker merged 3 commits into
mainfrom
fix/measure-axis-wavelength
Jun 29, 2026
Merged

Forward axis_wavelength from image() through measure() to expose()#178
jacobdparker merged 3 commits into
mainfrom
fix/measure-axis-wavelength

Conversation

@jacobdparker

Copy link
Copy Markdown
Contributor

@
AbstractImagingSensor.measure() did not forward the wavelength axis to
expose(), which then required image.inputs.wavelength to have exactly one
logical axis. This made SequentialSystem.image() fail for any scene whose
wavelength varies along more than one axis — e.g. several disjoint spectral
lines each sampled by its own wavelength bins.

This surfaces downstream in esis: imaging the synthetic multi-line AIA scene
(esis.flights.f1.data.synth.scene_aia(), axes velocity + wavelength)
through system.image(..., axis_wavelength="velocity") raises
ValueError: ...must have exactly one logical axis under optika 2.0, breaking
the distortion-fit machinery and the docs build.

Change

  • measure() gains an axis_wavelength parameter and forwards it to expose().
  • image() forwards its axis_wavelength through measure().
  • Adds regression test test_measure_axis_wavelength (red before, green after).

Release note

A 2.0.x release including this is needed to unblock esis PR #63 (which pins
optika~=2.0); that PR currently fails its docs build on exactly this bug.

🤖 Generated with Claude Code
@

…se()`.

`AbstractImagingSensor.measure()` did not forward the wavelength axis to
`expose()`, which then required `image.inputs.wavelength` to have exactly
one logical axis. This made `SequentialSystem.image()` fail for any scene
whose wavelength varies along more than one axis, e.g. several disjoint
spectral lines each sampled by its own wavelength bins.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.34%. Comparing base (9d38b2c) to head (becfb11).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #178   +/-   ##
=======================================
  Coverage   99.34%   99.34%           
=======================================
  Files         116      116           
  Lines        5967     5983   +16     
=======================================
+ Hits         5928     5944   +16     
  Misses         39       39           
Flag Coverage Δ
unittests 99.34% <100.00%> (+<0.01%) ⬆️

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.

Comment thread optika/sensors/_sensors.py
Comment thread optika/sensors/_sensors_test.py Outdated
…is case into `test_measure`.

Per Roy's review on #178:
- `measure()` signature now lists `axis_wavelength` immediately after `axis`
  (callers pass it by keyword, so the reorder is behavior-preserving).
- The `test_measure_axis_wavelength` method is folded into `test_measure`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jacobdparker

Copy link
Copy Markdown
Contributor Author

Thanks Roy — both addressed in 05809be:

  • measure() now lists axis_wavelength immediately after axis (all callers pass it by keyword, so the reorder is behavior-preserving).
  • test_measure_axis_wavelength is folded into test_measure as a second block (with renamed locals so it doesn't clobber the parametrized rays/wavelength).

Verified locally: pytest -k measure passes, black + ruff clean. (The red docs/readthedocs.org check is a pre-existing RTD env failure, unrelated to this change.)

@roytsmart

Copy link
Copy Markdown
Collaborator

can you update the rtd os to be ubuntu-lts-latest?

The `ubuntu-20.04` RTD build image is deprecated, causing the docs build to
fail. Per Roy's review on #178.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jacobdparker

Copy link
Copy Markdown
Contributor Author

Done in becfb11build.os is now ubuntu-lts-latest (the old ubuntu-20.04 RTD image was deprecated, which is what was failing the docs build). RTD should go green on this run.

@jacobdparker jacobdparker merged commit a6e6f7f into main Jun 29, 2026
12 checks passed
jacobdparker added a commit to esis-mission/esis that referenced this pull request Jun 29, 2026
optika 2.0.1 forwards `axis_wavelength` through `measure()` to `expose()`
(sun-data/optika#178), without which `system.image()` fails on multi-line
scenes and the docs build of `reports/aia-image-simulation.ipynb` errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants