Skip to content

Added SequentialSystem.distortion(), a method to fit a polynomial to the distortion function of the system.#181

Merged
roytsmart merged 6 commits into
mainfrom
feature/system-distortion
Jul 11, 2026
Merged

Added SequentialSystem.distortion(), a method to fit a polynomial to the distortion function of the system.#181
roytsmart merged 6 commits into
mainfrom
feature/system-distortion

Conversation

@roytsmart

Copy link
Copy Markdown
Collaborator

No description provided.

@roytsmart roytsmart force-pushed the feature/system-distortion branch from b73132c to ba4fd46 Compare July 10, 2026 03:58
roytsmart and others added 2 commits July 9, 2026 22:00
- 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

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.37%. Comparing base (028b85b) to head (c6a1b77).
⚠️ Report is 1 commits behind head on main.

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           
Flag Coverage Δ
unittests 99.37% <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.

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
@roytsmart roytsmart merged commit db4ccce into main Jul 11, 2026
12 checks passed
@roytsmart roytsmart deleted the feature/system-distortion branch July 11, 2026 16:07
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.

1 participant