Forward axis_wavelength from image() through measure() to expose()#178
Open
jacobdparker wants to merge 1 commit into
Open
Forward axis_wavelength from image() through measure() to expose()#178jacobdparker wants to merge 1 commit into
axis_wavelength from image() through measure() to expose()#178jacobdparker wants to merge 1 commit into
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 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
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:
|
roytsmart
reviewed
Jun 25, 2026
| wavelength: na.AbstractScalar, | ||
| axis: None | str | Sequence[str] = None, | ||
| where: bool | na.AbstractScalar = True, | ||
| axis_wavelength: None | str = None, |
Collaborator
There was a problem hiding this comment.
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( |
Collaborator
There was a problem hiding this comment.
can you just incorporate this test into test_measure()?
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.
@
AbstractImagingSensor.measure()did not forward the wavelength axis toexpose(), which then requiredimage.inputs.wavelengthto have exactly onelogical axis. This made
SequentialSystem.image()fail for any scene whosewavelength 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(), axesvelocity+wavelength)through
system.image(..., axis_wavelength="velocity")raisesValueError: ...must have exactly one logical axisunder optika 2.0, breakingthe distortion-fit machinery and the docs build.
Change
measure()gains anaxis_wavelengthparameter and forwards it toexpose().image()forwards itsaxis_wavelengththroughmeasure().test_measure_axis_wavelength(red before, green after).Release note
A 2.0.x release including this is needed to unblock
esisPR #63 (which pinsoptika~=2.0); that PR currently fails its docs build on exactly this bug.🤖 Generated with Claude Code
@