Repository navigation
Description
Problem
GaussianBeamletcompares its Lagrange invariant withλ/πwithinget_invariant_threshold()(absolute, 1e-6) and replaces it silently when off:gauss_parametersreportsw0 / M2forM2above 1 + π at 1 µm and above 1.3 at 10.6 µm- A beamlet that leaves the range of its model traces on without a warning:
w0 = 6.4 mmthrough a lens with f = 30 mm reportsw0 = 1.9 µmbehind it - Since Bugfix: astigmatic beamlet z0, power for any M2, model limit #206 the astigmatic beamlet checks the same quantity relative to its start value with
get_lagrange_tolerance()and stops with a warning: two limits for one quantity - Seen on 0.14.0
using BeamletOptics
g = GaussianBeamlet([0.0, 0, 0], [0.0, 1, 0], 1e-6, 1e-3; M2 = 10, z0 = 0.2)
gauss_parameters(g, 0.0)[4] # 1e-4, expected 1e-3
g = GaussianBeamlet([0.0, 0, 0], [0.0, 1, 0], 10.6e-6, 1e-3; M2 = 2, z0 = 0.2)
gauss_parameters(g, 0.0)[4] # 5e-4, expected 1e-3
lens = SphericalLens(0.03, -0.03, 8e-3, 0.0254, x -> 1.5)
translate3d!(lens, [0, 0.1, 0])
g = GaussianBeamlet([0.0, 0, 0], [0.0, 1, 0], 1064e-9, 6.4e-3)
solve_system!(System([lens]), g) # no warning
gauss_parameters(g, 0.2)[4] # 1.9e-6Tasks
-
gauss_parametersandwaist_parametersof aGaussianBeamletreport the waist radius for anyM2and λ - A
GaussianBeamletwhose Lagrange invariant leavesget_lagrange_tolerance()of its start value stops tracing with the same warning as anAstigmaticGaussianBeamlet -
check_invariant = falseturns that check off for both beam models, andget_invariant_threshold()no longer applies to the Lagrange invariant of either
Notes
- Decided by the maintainers in the review of Bugfix: astigmatic beamlet z0, power for any M2, model limit #206 (2026-11-01): one form of the Lagrange check for both beam models, to be recorded in "Code style" of AGENTS.md
- To be fixed together with Bug: gauss_parameters gives a wrong w0 at a tilted waist #209: at its tilted waist the same invariant is 4041 × λ/π from rounding noise, the factor by which
w0is off there - Field and detector power are not affected: at
M2 = 10the field matches the analytic Gaussian within 3.4e-6 and a detector collectsP0 - Depends on Bugfix: astigmatic beamlet z0, power for any M2, model limit #206, which adds
get_lagrange_tolerance
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity