Added SequentialSystem.distortion(), a method to fit a polynomial to the distortion function of the system.#181
Merged
Merged
Conversation
…o the distortion function of the system.
b73132c to
ba4fd46
Compare
- distortion() raises a clear ValueError for systems whose grid_input wavelength does not vary along its own logical axis, instead of a cryptic unpacking error. - The pupil average of the sensor coordinates is now weighted by the unvignetted rays, falling back to all rays for field points that are excluded from the fit, so that vignetted rays no longer bias the calibration points. - plot_residual() masks the excluded calibration points with np.where, which also works when `where` is a plain bool, and computes the default vmax from the masked residual so invalid points no longer inflate the color scale. - test_distortion parametrizes the polynomial degree and covers the scalar-wavelength error branch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lm9SxSpyNg9hx8dNL9pUXc
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #181 +/- ##
=======================================
Coverage 99.36% 99.37%
=======================================
Files 116 116
Lines 6151 6230 +79
=======================================
+ Hits 6112 6191 +79
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:
|
If any of the grids are given, the rays are traced with rayfunction(), which returns sensor-local coordinates like rayfunction_default, and the logical axes are inferred from the resulting inputs so that grids left as None inherit the corresponding component of grid_input. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lm9SxSpyNg9hx8dNL9pUXc
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.
No description provided.