Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
b1cf578
feat: implement AstigmaticGaussianBeamlet with synchronised tracing a…
TacHawkes Apr 27, 2026
b57742d
Fix docs
TacHawkes Apr 27, 2026
6427c34
Add some missing stuff
TacHawkes Apr 27, 2026
9ff6ac5
Improve AGB constructors to make the drop-in compatible
TacHawkes Apr 28, 2026
1a02154
Adapt exports slightly
TacHawkes Apr 28, 2026
f154c5c
Test AGBs
TacHawkes Apr 29, 2026
2c3abad
Flip Guoy phase sign, correct beam waist size and fix Surface-Spec
TacHawkes Apr 29, 2026
ed21f51
Address codex issues
TacHawkes Apr 29, 2026
fda03c1
Bump CI julia versions
TacHawkes Apr 30, 2026
18a1b7b
use built-in ellipse helper fc.t
Apr 30, 2026
7efd6bb
render all agb rays,, standard options as with GaussianBeamlet
Apr 30, 2026
efde7f7
add show_waist kwarg
Apr 30, 2026
2b4208c
Sample both directions of the parabasal vectors and consider the phas…
TacHawkes May 1, 2026
274590e
Re-add the check for on-axis waists
TacHawkes May 1, 2026
0a060e9
More fixes to the core math
TacHawkes May 1, 2026
4c14e57
More phase fixes
TacHawkes May 1, 2026
1a37903
Sort the math again so it makes more sense
TacHawkes May 1, 2026
6607691
Add Fraunhofer diffraction test case, add optical invariant check to …
TacHawkes May 2, 2026
51a5bbb
Add AGB beam groups, simple decomposition, docs and a lot of small th…
TacHawkes May 2, 2026
1a090a5
Add double-slit example
TacHawkes May 3, 2026
558a235
Fix whitespaces
TacHawkes May 3, 2026
d2abf92
Improve AGB explanation
TacHawkes May 3, 2026
1aec887
Minor cleanup
TacHawkes May 3, 2026
c64618a
Bump Julia compat and mark todos
TacHawkes May 3, 2026
0a65515
Improve comments
May 4, 2026
d9ce86a
disable detector.md figs if not in CI pipeline
May 4, 2026
774ce50
change agb show_beams color
May 4, 2026
a9cdee9
fix for render bug (?)
May 4, 2026
59b4409
Fix parabasal calculation, check all invariants and be way more stric…
TacHawkes May 4, 2026
c46a8e4
Address further issues
TacHawkes May 4, 2026
756c15d
Try unifying waist parameters
TacHawkes May 4, 2026
84046a7
Address new codex issues
TacHawkes May 5, 2026
760812f
Relax Logging compat
May 5, 2026
05a0824
rm deprecated GB constructor
May 5, 2026
562b089
allow disable of invariant check for some situations
May 5, 2026
58524c7
split beams.md
May 5, 2026
fc37b9f
add citations and some illustrations
May 5, 2026
d31c48e
Minor formatting changes
TacHawkes May 5, 2026
cd8c8f2
Use Preferences.jl for constants, add P0/E0 where necessary.
TacHawkes May 5, 2026
4511529
Forgot to commit Project.toml
TacHawkes May 5, 2026
776aa95
Some small fixes and minor speed optimizations
TacHawkes May 6, 2026
7483683
Introduce caching of propagation data for GB/AGBs to speed up electri…
TacHawkes May 6, 2026
0c3136f
add BMO.config to docs index (bug fix)
May 6, 2026
f40d1eb
update cond_save
May 6, 2026
acb3972
make cond_save even more retarded :D
May 6, 2026
23ede7b
agb docs
May 6, 2026
916087d
enable multiline matching...
May 6, 2026
ba43ef6
move double slit example to example section
May 6, 2026
33e697f
Minor improvements to detector optimization
TacHawkes May 7, 2026
c8dfae4
minor gb docs update
May 7, 2026
b038e65
Some more minor performance tweaks
TacHawkes May 7, 2026
1ddd1eb
minor agb doc changes
May 7, 2026
ac92e85
Merge branch 'AstigmaticGausslets' of https://github.com/JuliaPhysics…
May 7, 2026
0ce47dc
Fix polarization bug, improve field calculation and (re)tracing of AGBs.
TacHawkes May 8, 2026
4bb4e26
mini doc changes
May 8, 2026
5d21a79
Merge branch 'AstigmaticGausslets' of https://github.com/JuliaPhysics…
May 8, 2026
217edc4
Exp. fix for AGB twisting
TacHawkes May 9, 2026
f57c4b5
AGBs make my brain explode...
TacHawkes May 9, 2026
4c6d1ef
Merge remote-tracking branch 'refs/remotes/origin/AstigmaticGausslets…
TacHawkes May 9, 2026
6e4db6e
Elliptical beam groups, some QoL improvements, document the waist par…
TacHawkes May 9, 2026
4bd6ec6
Address codex issues
TacHawkes May 9, 2026
e669bd1
Fix doc errors
TacHawkes May 9, 2026
ffe985b
Add warning about invariant check to general AGB constructor
TacHawkes May 9, 2026
9cf1f14
Make sure all exported functions have docstrings
TacHawkes May 9, 2026
0aea026
Fix power convention issue
TacHawkes May 10, 2026
9336f9c
Fix and test AGB initialization with different waist offsets.
TacHawkes May 17, 2026
bc0ef47
move cond_incl to DocUtils.jl module
May 18, 2026
5708e23
update .gitignore to allow pre-rendered images
May 18, 2026
98adb60
add prerender_include fct
May 18, 2026
be60ec3
add docs to new DocUtils
May 18, 2026
5fa7782
rm placeholder statements
May 18, 2026
8fdcbf4
add calc_center_points tests
May 19, 2026
637f8a1
test calc_local_pos for gb
May 22, 2026
aa16f58
test calc_local_pos for agb
May 22, 2026
172dff7
Bump version
TacHawkes May 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ext/BeamletOpticsMakieExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ render!(::_RenderEnv, ::T; kwargs...) where T<:_RenderTypes = throw(RenderNotImp
# include order dependant!
include("RenderBeam.jl")
include("RenderGaussian.jl")
include("RenderAstigmaticGaussian.jl")
include("RenderSDF.jl")
include("RenderMesh.jl")
include("RenderObjects.jl")
Expand Down
68 changes: 68 additions & 0 deletions ext/RenderAstigmaticGaussian.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
"""
render!(ax, agb::AstigmaticGaussianBeamlet; kwargs...)

Render the 1/e² envelope of the [`AstigmaticGaussianBeamlet`](@ref) as a smooth 3D surface.

# Keyword args

- `show_beams = false`: plot the generating rays (chief, waist, divergence)
- `flen = 0.1`: length of the final beam segment in case of no intersection [m]
- `z_res::Int = 100`: longitudinal resolution
- `r_res::Int = 64`: radial (angular) resolution

# Makie kwargs

- `color = :red`
- `alpha = 0.3`: transparency of the envelope
"""
function render!(
axis::_RenderEnv,
agb::BMO.AstigmaticGaussianBeamlet{T};
# kwargs
show_beams = false,
show_pos = false,
flen = 0.1,
z_res = 100,
r_res = 64,
# Makie kwargs
color = :red,
alpha = 0.3,
kwargs...
) where {T}

# Helper to calculate a point on the elliptical cross-section
ellipse(t, p0, w1, w2) = p0 + w1 * cos(t) + w2 * sin(t)

for child in PreOrderDFS(agb)
l = length(child) + flen

# Longitudinal and angular ranges
us = LinRange(0, l, z_res)
vs = LinRange(0, 2π, r_res)

# Precompute waist parameters at each z
params = [BMO.waist_parameters(child, u) for u in us]

# Build surface mesh matrices
Xt = [ellipse(v, p[1], p[2], p[3])[1] for p in params, v in vs]
Yt = [ellipse(v, p[1], p[2], p[3])[2] for p in params, v in vs]
Zt = [ellipse(v, p[1], p[2], p[3])[3] for p in params, v in vs]

# Render the envelope as a smooth surface
surface!(axis, Xt, Yt, Zt;
color = fill(color, size(Xt)),
alpha = alpha,
transparency = true,
kwargs...)

# Optionally, plot generating rays
if show_beams
render!(axis, child.c; show_pos, flen, color = :red)
render!(axis, child.dxp; show_pos, flen, color = :green)
render!(axis, child.wxp; show_pos, flen, color = :blue)
render!(axis, child.dyp; show_pos, flen, color = :cyan)
render!(axis, child.wyp; show_pos, flen, color = :magenta)
end
end
return axis
end
2 changes: 2 additions & 0 deletions src/AbstractTypes/AbstractGaussian.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"""From Wilhelm (2001)"""
isparaxial(w0, λ; margin::Int=100) = w0 / λ > margin ? true : false
1 change: 1 addition & 0 deletions src/AbstractTypes/AbstractTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ include("AbstractObject.jl")
include("AbstractShapeTrait.jl")
include("AbstractRay.jl")
include("AbstractBeam.jl")
include("AbstractGaussian.jl")
include("AbstractSystem.jl")
include("AbstractUtils.jl")
Loading
Loading