Repository navigation
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #62 +/- ##
==========================================
+ Coverage 73.46% 75.08% +1.62%
==========================================
Files 61 70 +9
Lines 3885 5150 +1265
==========================================
+ Hits 2854 3867 +1013
- Misses 1031 1283 +252 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a57e5f814f
ℹ️ 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".
| """ | ||
| function coating_transmittance(c, θi, λ, n1, n2; from_front::Bool = true, local_p = nothing) | ||
| J_t = get_jones_matrix(c, θi, λ, n1, n2, false; from_front = from_front, local_p = local_p) | ||
| return clamp(unpolarized_transmittance(J_t), 0.0, 1.0) |
There was a problem hiding this comment.
Apply impedance scaling to transmitted power
When n1 != n2, this treats field transmission amplitudes as power. For example, an uncoated normal-incidence air→glass boundary returns J_t = 0.8, so coating_transmittance becomes 0.64 even though the physical transmitted power is 1 - R = 0.96; scalar Ray weights through uncoated lenses or thin-film AR coatings are therefore undercounted and can trigger incorrect detector power or power-cutoff behavior. The transmittance path needs the usual admittance factor instead of just abs2(J_t).
Useful? React with 👍 / 👎.
| end | ||
|
|
||
| function bounding_sphere(s::CylinderSDF{T}) where T | ||
| return (Point3{T}(0), sqrt(s.radius^2 + (s.height / 2)^2)) |
There was a problem hiding this comment.
Use the full cylinder half-height in the culling sphere
For CylinderSDF, the SDF subtracts cylinder.height directly, so the caps are at |y| == height; this new bounding sphere halves that extent again. Long cylinders now get valid side hits rejected before ray marching—for example CylinderSDF(1, 10) with a ray crossing the side near y = 9 never reaches _raymarch_outside because the undersized sphere misses. The radius should include the full stored y half-extent.
Useful? React with 👍 / 👎.
| Generates a two-component "cemented" doublet lens consisting of two aspherical lens elements with conic constants `k1`, `k2`, and `k3`. | ||
| """ | ||
| @inline _to_refractive_index(n::Real) = (λ -> n) | ||
| @inline _to_refractive_index(n) = test_refractive_index_function(n) |
There was a problem hiding this comment.
Return validated refractive-index objects
When n1 or n2 is any valid non-Real RefractiveIndex such as a function, DiscreteRefractiveIndex, or SellmeierEquation, this helper calls test_refractive_index_function and returns its nothing result. AsphericalDoubletLens then passes nothing into the Lens constructors below, so dispersive aspherical doublets fail at construction while constant numeric indices work. Return n after validation instead.
Useful? React with 👍 / 👎.
…ix surface_tag fallback and numeric_gradient step
a57e5f8 to
24b1328
Compare
24b1328 to
04a678a
Compare
…SDF surface_tags to :top/:bottom, and make Aqua test conditional
…ons and polarization raytracing
…oring, and Makie visualization
04a678a to
56aae83
Compare
…and preserve Gaussian beamlet ray weights
Part 3 of 3: Surface Coating Models, Component Modernization & Rendering
This PR introduces the surface coating API and updates components:
ThinFilmCoating,SimpleARCoating,SimpleHRCoating,SimpleBeamsplitterCoating,JonesCoating).with_coatingssurface property composition without redundant 2D mesh wrapper bodies.PlateBeamsplitter,PolarizingBeamSplitter,CubeBeamsplitter, andWaveplate.