Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 089e5dd700
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for b in PreOrderDFS(beam), ray in rays(b) | ||
| isect = intersection(ray) | ||
| push!(seq, isnothing(isect) ? nothing : object(isect)) |
There was a problem hiding this comment.
Distinguish clear surfaces within each hit object
When a lens has a supported mechanical_diameter larger than its clear optical diameter, rays through the annular mechanical RingSDF can enter and exit the same Lens object twice, just as the axial ray does through the optical faces. Because this sequence stores only object identity, both paths appear as Lens, Lens, nothing, so clear_aperture can return the mechanical diameter instead of the actual clear aperture. The comparison must retain enough boundary or clear-zone information to distinguish these paths.
AGENTS.md reference: AGENTS.md:L19-L22
Useful? React with 👍 / 👎.
| src = CollimatedSource(bundle, D, pos, d) | ||
| solve_system!(system, src; progress = false, kwargs...) |
There was a problem hiding this comment.
Preserve detector state during probe traces
When system contains a Detector, every internal trial trace pushes synthetic hits into it, so a fresh detector is left containing all bisection bundles rather than user experiment data. If it already contains Gaussian-beamlet hits, the initial scalar-ray trace instead attempts to push a RayHit into that typed hit vector and throws. Isolate these probe solves from stateful components or save, reset, and restore their state inside this public function.
AGENTS.md reference: AGENTS.md:L157-L159
Useful? React with 👍 / 👎.
| function vignetted(group::AbstractBeamGroup, reference::Beam) | ||
| ref = hit_sequence(reference) | ||
| return findall(b -> !_same_sequence(hit_sequence(b), ref), beams(group)) |
There was a problem hiding this comment.
Support every accepted beam-group member type
AbstractBeamGroup permits groups whose members are Gaussian or astigmatic beamlets, but the callback here invokes hit_sequence(b) and the only available method accepts Beam. Calling the exported vignetted API with an AstigmaticBeamGroup, such as one returned by GaussianBeamletDecomposition, therefore raises a MethodError; either implement traversal for those beam types or narrow the method signature and documented contract to scalar-ray groups.
AGENTS.md reference: AGENTS.md:L103-L109
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #107 +/- ##
==========================================
+ Coverage 87.88% 88.10% +0.21%
==========================================
Files 73 74 +1
Lines 4442 4505 +63
==========================================
+ Hits 3904 3969 +65
+ Misses 538 536 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…mlet groups Compare (object, boundary part) pairs so the mechanical rim of a lens is not confused with its optical faces, save and restore detector hits during the probe traces, and support beamlet groups via their chief rays. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No description provided.