Skip to content

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

Open
jacobdparker wants to merge 1 commit into
mainfrom
fix/measure-axis-wavelength
Open

Forward axis_wavelength from image() through measure() to expose()#178
jacobdparker wants to merge 1 commit 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 (2d55e0c).
⚠️ 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     5984   +17     
=======================================
+ Hits         5928     5945   +17     
  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.

wavelength: na.AbstractScalar,
axis: None | str | Sequence[str] = None,
where: bool | na.AbstractScalar = True,
axis_wavelength: None | str = None,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you re-order so that axis_wavelength is after axis?

assert a.axis_pixel.x in result.outputs.shape
assert a.axis_pixel.y in result.outputs.shape

def test_measure_axis_wavelength(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you just incorporate this test into test_measure()?

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