Skip to content

Tests: validation against analytic references - #156

Merged
StackEnjoyer merged 1 commit into
masterfrom
test/analytic-references
Oct 15, 2026
Merged

StackEnjoyer merged 1 commit into
masterfrom
test/analytic-references

Conversation

@TacHawkes

Copy link
Copy Markdown
Collaborator

Internal changes

  • New test/E2E/TestAnalyticReferences.jl (37 tests, ~6 s): BMO against references that do not use BMO
    • exact meridional ray trace through spherical surfaces: 6 lens shapes incl. a cemented doublet and the 10-surface Sonnar; BMO agrees to ~1e-11 m in height and ~1e-10 rad in slope
    • spherical mirror focus R/2, paraboloid focus for all heights
    • prism minimum deviation, Sellmeier N-BK7 vs datasheet
    • Fresnel transmission of a window, s and p, 0°–70°
    • GaussianBeamlet (thick lens) and AstigmaticGaussianBeamlet (cylindrical lens) vs ABCD
    • Michelson fringe period λ/2 and contrast

No physics errors found. For a wide beamlet, BMO shifts the waist by the exact spherical aberration of its parabasal rays, which the paraxial ABCD law does not contain; the test uses a narrow beam.

Agent skill

  • No skill files affected

Closes #155

Traced results compared with references that do not use BMO:

- an exact meridional ray trace through spherical surfaces (Snell's law
  surface by surface, written in the test): bi-convex, plano-convex,
  convex-plano, bi-concave and meniscus lenses, a cemented doublet and
  the 10 surfaces of the Sonnar of TestSonnarLens.jl, at heights from
  0.01 mm to near the rim; BMO agrees to ~1e-11 m in height and ~1e-10
  rad in slope
- the paraxial focus of a spherical mirror at R/2, the aberration-free
  focus of a paraboloid
- the minimum deviation of a prism, n sin(A/2) = sin((A + D)/2)
- the Sellmeier equation of N-BK7 against n_F, n_d, n_C of the datasheet
- the field behind a window for s and p polarization from 0° to 70°,
  |t12 t21| = 1 - |r|² (Fresnel, Stokes relations)
- the radius of a GaussianBeamlet behind a thick lens and of an
  AstigmaticGaussianBeamlet behind a cylindrical lens, per axis,
  against the ABCD law
- the fringe period λ/2 and the contrast of a Michelson interferometer

No physics errors were found. The beamlet test uses a narrow beam: for a
wide one, BMO shifts the waist by the exact spherical aberration of the
parabasal rays (e.g. -7.9 µm for w = 0.5 mm on a 50 mm lens), which the
paraxial ABCD law does not contain.
@TacHawkes TacHawkes added this to the v0.14.0 milestone Oct 15, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-15T16:45:50.397608Z 505ac59 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.94%. Comparing base (2204bae) to head (505ac59).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #156      +/-   ##
==========================================
+ Coverage   89.81%   89.94%   +0.13%     
==========================================
  Files          82       82              
  Lines        4525     4525              
==========================================
+ Hits         4064     4070       +6     
+ Misses        461      455       -6     

☔ 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.

@StackEnjoyer
StackEnjoyer merged commit 56793b0 into master Oct 15, 2026
7 checks passed
@StackEnjoyer
StackEnjoyer deleted the test/analytic-references branch October 15, 2026 20:21
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.

No tests against references independent of BMO

2 participants