Repository navigation
Bugfix: GaussianBeamlet phase in media and behind lenses - #133
Merged
Merged
Conversation
electric_field(gauss, r, z) added the optical path of the whole beam, so an element behind the evaluated point changed the phase in front of it, and inside a medium the phase advanced with the vacuum wavenumber. The optical path is now taken up to the evaluated point and the wavenumber of the medium is used along and across the beam. GaussianBeamletHit caches the optical path in front of its segment. Fields on the last segment in air are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The field took the Gouy phase relative to the waist of the current segment, so the phase collected in front of a lens was lost: 20 mm behind an f = 50 mm lens it was 88.5 deg instead of the -1.5 deg of the ABCD law. The field now adds the steps of the local Gouy phase at every surface and from a parent to its children, GaussianBeamletHit caches the sum. gauss_parameters keeps returning the phase relative to the local waist. Changes the absolute phase behind focusing optics. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #133 +/- ##
==========================================
+ Coverage 89.81% 90.08% +0.26%
==========================================
Files 82 82
Lines 4525 4577 +52
==========================================
+ Hits 4064 4123 +59
+ Misses 461 454 -7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gauss_parameters(gb, z) returned the Gouy phase relative to the waist of the local segment, which jumps at every lens, while gauss_parameters(agb, z) and the field of both models collect it along the beam. It now returns the collected phase as well: continuous at every surface and from a parent to its children, equal to the Gouy phase of electric_field. The local parameters are computed by _local_gauss_parameters, which the field and _gouy_before use. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…c model The Gouy phase behind one and two lenses, the ψ of gauss_parameters and the phase across the beam in the glass are compared with analytic ABCD values instead of the AstigmaticGaussianBeamlet, which is another result of BMO. Co-Authored-By: Claude Opus 5.5 <[email protected]>
It uses only w and w0, which do not depend on the Gouy phase, so it needs no local kernel. _local_gauss_parameters stays for _gouy_before (which gauss_parameters calls) and for the field per detector pixel, where the hit caches the collected Gouy phase. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The kernel _local_gauss_parameters is replaced by a positional method of gauss_parameters that adds the offset ψ0 to the Gouy phase relative to the local waist. Its body is the one of master apart from that. The public gauss_parameters(gauss, z) passes the collected Gouy phase in front of the segment, _gouy_before passes 0, and the field per detector pixel passes the phase that the hit cached. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merged
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.
Bugfixes
GaussianBeamletrestarted at every lens, 90° off behind one lensGaussianBeamletadvanced with the vacuum wavenumbergauss_parameters(gb, z): ψ jumped at every lens, now collected as for astigmatic beamletselectric_field(gauss, r, z): an element behind the point changed the phase in front of itDoc changes
gauss_parameters,electric_field: ψ is the Gouy phase collected along the beamCONVENTIONS.mdupdatedInternal changes
GaussianBeamletHitcaches optical path and Gouy phase in front of its segmentCloses #125, closes #126