Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions docs/src/assets/beam_renders/agb_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ c_view = [

agb = AstigmaticGaussianBeamlet([0,0,0], [0,1,0], 9e-4, 2e-3; support=[0,0,1])

l = ThinLens(20e-3, 20e-3, BMO.inch, 1.5)
l = ThinLens(20e-3, 20e-3, BMO.inch, ConstantRefractiveIndex(1.5))
s = System([l])

translate3d!(l, [0, 30e-3, 0])
Expand Down Expand Up @@ -56,8 +56,8 @@ save("agbtest2.png", fig; px_per_unit=8, update = false)
##
s1 = BMO.CylinderSDF(BMO.inch/2, BMO.inch)
s2 = BMO.CylinderSDF(BMO.inch/2, BMO.inch)
l1 = BMO.Lens(s1, n->1.5)
l2 = BMO.Lens(s2, n->1.5)
l1 = BMO.Lens(s1, ConstantRefractiveIndex(1.5))
l2 = BMO.Lens(s2, ConstantRefractiveIndex(1.5))
translate3d!(l1, [0, 50mm, 0])
translate3d!(l2, [0, 100mm, 0])
xrotate3d!(l1, deg2rad(90))
Expand Down
2 changes: 1 addition & 1 deletion docs/src/assets/beam_renders/beam_catalog_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const λ = 1e-6

"LB1811-like bi-convex lens and a detector near its focus."
function test_system()
lens = SphericalLens(34.9mm, -34.9mm, 6.8mm, inch, λ -> 1.5168)
lens = SphericalLens(34.9mm, -34.9mm, 6.8mm, inch, ConstantRefractiveIndex(1.5168))
translate3d!(lens, [0, 50mm, 0])
detector = Detector(inch)
translate3d!(detector, [0, 85mm, 0])
Expand Down
2 changes: 1 addition & 1 deletion docs/src/assets/beam_renders/beam_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ m1 = RoundPlanoMirror(20mm, 5mm)
m2 = RoundPlanoMirror(20mm, 5mm)
m3 = RoundPlanoMirror(20mm, 5mm)

prism = RightAnglePrism(20mm, 20mm, n->1.2)
prism = RightAnglePrism(20mm, 20mm, ConstantRefractiveIndex(1.2))

translate_to3d!(m1, [0, 100mm, 0])
zrotate3d!(m1, deg2rad(-30))
Expand Down
2 changes: 1 addition & 1 deletion docs/src/assets/beam_renders/gb_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ c_view = [

gb = GaussianBeamlet([0,0,0], [0,1,0], 9e-4, 2e-3; support=[0,0,1])

l = ThinLens(20e-3, 20e-3, BMO.inch, 1.5)
l = ThinLens(20e-3, 20e-3, BMO.inch, ConstantRefractiveIndex(1.5))
s = System([l])

translate3d!(l, [0, 30e-3, 0])
Expand Down
4 changes: 2 additions & 2 deletions docs/src/assets/bs_assets/cbs_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ const mm = 1e-3
##
n = 1.5

cbs1 = CubeBeamsplitter(BeamletOptics.inch, _->n)
cbs1 = CubeBeamsplitter(BeamletOptics.inch, ConstantRefractiveIndex(n))
cbs1_mount = NonInteractableObject(joinpath(@__DIR__, "CBS Mount.stl"))

cbs2 = CubeBeamsplitter(BeamletOptics.inch, _->n)
cbs2 = CubeBeamsplitter(BeamletOptics.inch, ConstantRefractiveIndex(n))
cbs2_mount = NonInteractableObject(joinpath(@__DIR__, "CBS Mount.stl"))
zrotate3d!(cbs2_mount, π)

Expand Down
4 changes: 2 additions & 2 deletions docs/src/assets/bs_assets/pbs_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ const mm = 1e-3

##
n = 1.5
cbs = RectangularPlateBeamsplitter(36mm, 25mm, 5mm, _->n)
cbs = RectangularPlateBeamsplitter(36mm, 25mm, 5mm, ConstantRefractiveIndex(n))
cbs_mount = NonInteractableObject(joinpath(@__DIR__, "PBS Mount.stl"))

cbs_assembly = ObjectGroup([cbs, cbs_mount])

cmp = RectangularCompensatorPlate(36mm, 25mm, 5mm, _->n)
cmp = RectangularCompensatorPlate(36mm, 25mm, 5mm, ConstantRefractiveIndex(n))
cmp_mount = NonInteractableObject(joinpath(@__DIR__, "PBS Mount.stl"))

cmp_assembly = ObjectGroup([cmp, cmp_mount])
Expand Down
6 changes: 3 additions & 3 deletions docs/src/assets/catalog_assets/catalog_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const mm = 1e-3
const inch = BMO.inch

# refractive indices, the exact values do not matter for a catalog tile
const n_crown = λ -> 1.5168
const n_flint = λ -> 1.7
const n_crown = ConstantRefractiveIndex(1.5168)
const n_flint = ConstantRefractiveIndex(1.7)

"Two cemented spherical lenses (AC254-100-like), assembled via the `DoubletLens` type directly."
function manual_doublet()
Expand Down Expand Up @@ -60,7 +60,7 @@ const TILES = [
# lenses
"Lens" => object_tile(() -> Lens(SphericalSurface(25.8mm, inch), CircularFlatSurface(inch), 5.3mm, n_crown)),
"SphericalLens" => object_tile(() -> SphericalLens(34.9mm, -34.9mm, 6.8mm, inch, n_crown)),
"ThinLens" => object_tile(() -> ThinLens(34.9mm, -34.9mm, inch, 1.5)),
"ThinLens" => object_tile(() -> ThinLens(34.9mm, -34.9mm, inch, ConstantRefractiveIndex(1.5))),
"DoubletLens" => object_tile(manual_doublet),
"SphericalDoubletLens" => object_tile(() -> SphericalDoubletLens(87.9mm, -105.6mm, -1000, 6mm, 3mm, inch, n_crown, n_flint)),
"TripletLens" => object_tile(manual_triplet),
Expand Down
6 changes: 3 additions & 3 deletions docs/src/assets/detector_assets/spotdetector_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ const mm = 1e-3

##
# define spherical lenses
l1 = SphericalLens(69.21e-3, 433.84e-3, 9.33e-3, 70e-3, λ -> 1.671)
l1 = SphericalLens(69.21e-3, 433.84e-3, 9.33e-3, 70e-3, ConstantRefractiveIndex(1.671))
# front triplet: last surface only 40 mm clear aperture -> constructed from surfaces
l234 = TripletLens(
SphericalSurface(35.86e-3, 60e-3), SphericalSurface(85.87e-3, 60e-3),
SphericalSurface(-646.31e-3, 60e-3), SphericalSurface(23.51e-3, 40e-3),
11.81e-3, 7.05e-3, 1.9e-3, λ -> 1.671, λ -> 1.4892, λ -> 1.7394)
11.81e-3, 7.05e-3, 1.9e-3, ConstantRefractiveIndex(1.671), ConstantRefractiveIndex(1.4892), ConstantRefractiveIndex(1.7394))
l567 = SphericalTripletLens(Inf, 51.09e-3, -22.12e-3, -103.13e-3, 2.48e-3, 19.81e-3, 4.57e-3, 42e-3,
λ -> 1.5232, λ -> 1.6578, λ -> 1.5894)
ConstantRefractiveIndex(1.5232), ConstantRefractiveIndex(1.6578), ConstantRefractiveIndex(1.5894))

# Calculate translation distances
l_234 = thickness(l1) + 0.38e-3
Expand Down
14 changes: 7 additions & 7 deletions docs/src/assets/examples/double_gauss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ const mm = 1e-3

##
# define spherical lenses
l1 = SphericalLens(48.88e-3, 182.96e-3, 8.89e-3, 52.3e-3, λ -> 1.62286)
l23 = SphericalDoubletLens(36.92e-3, Inf, 23.06e-3, 15.11e-3, 2.31e-3, 45.11e-3, λ -> 1.58565, λ -> 1.67764)
l45 = SphericalDoubletLens(-23.91e-3, Inf, -36.92e-3, 1.92e-3, 7.77e-3, 40.01e-3, λ -> 1.57046, λ -> 1.64128)
l6 = SphericalLens(1063.24e-3, -48.88e-3, 6.73e-3, 45.11e-3, λ -> 1.62286)
l1 = SphericalLens(48.88e-3, 182.96e-3, 8.89e-3, 52.3e-3, ConstantRefractiveIndex(1.62286))
l23 = SphericalDoubletLens(36.92e-3, Inf, 23.06e-3, 15.11e-3, 2.31e-3, 45.11e-3, ConstantRefractiveIndex(1.58565), ConstantRefractiveIndex(1.67764))
l45 = SphericalDoubletLens(-23.91e-3, Inf, -36.92e-3, 1.92e-3, 7.77e-3, 40.01e-3, ConstantRefractiveIndex(1.57046), ConstantRefractiveIndex(1.64128))
l6 = SphericalLens(1063.24e-3, -48.88e-3, 6.73e-3, 45.11e-3, ConstantRefractiveIndex(1.62286))

# Calculate translation distances
l_23 = thickness(l1) + 0.38e-3
Expand Down Expand Up @@ -51,14 +51,14 @@ set_view(ax, cview)
save("double_gauss.png", fig; px_per_unit=8, update = false)

## Sonnar comparison
s1 = SphericalLens(69.21e-3, 433.84e-3, 9.33e-3, 70e-3, λ -> 1.671)
s1 = SphericalLens(69.21e-3, 433.84e-3, 9.33e-3, 70e-3, ConstantRefractiveIndex(1.671))
# front triplet: last surface only has a clear aperture of 40 mm -> constructed from surfaces
s234 = TripletLens(
SphericalSurface(35.86e-3, 60e-3), SphericalSurface(85.87e-3, 60e-3),
SphericalSurface(-646.31e-3, 60e-3), SphericalSurface(23.51e-3, 40e-3),
11.81e-3, 7.05e-3, 1.9e-3, λ -> 1.671, λ -> 1.4892, λ -> 1.7394)
11.81e-3, 7.05e-3, 1.9e-3, ConstantRefractiveIndex(1.671), ConstantRefractiveIndex(1.4892), ConstantRefractiveIndex(1.7394))
s567 = SphericalTripletLens(Inf, 51.09e-3, -22.12e-3, -103.13e-3, 2.48e-3, 19.81e-3, 4.57e-3, 42e-3,
λ -> 1.5232, λ -> 1.6578, λ -> 1.5894)
ConstantRefractiveIndex(1.5232), ConstantRefractiveIndex(1.6578), ConstantRefractiveIndex(1.5894))

# Calculate translation distances
s_234 = thickness(s1) + 0.38e-3
Expand Down
32 changes: 16 additions & 16 deletions docs/src/assets/examples/lens_groups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ const mm = 1e-3
const cm = 10mm

## focus group
l1 = SphericalDoubletLens(103.4371e-3, 61.14925e-3, -603.2959e-3, 1.5e-3, 10.03975e-3, 55e-3, 1.963000, 1.603112)
l2 = SphericalLens(49.97282e-3, 168.2416e-3, 8.622723e-3, 52e-3, 1.603001)
l1 = SphericalDoubletLens(103.4371e-3, 61.14925e-3, -603.2959e-3, 1.5e-3, 10.03975e-3, 55e-3, ConstantRefractiveIndex(1.963000), ConstantRefractiveIndex(1.603112))
l2 = SphericalLens(49.97282e-3, 168.2416e-3, 8.622723e-3, 52e-3, ConstantRefractiveIndex(1.603001))

l_2 = BeamletOptics.thickness(l1) + 1e-4
translate3d!(l2, [0, l_2, 0])

focus_group = ObjectGroup([l1, l2])

## variator
l3 = SphericalLens(100.3834e-3, 16.72327e-3, 1e-3, 28.00995e-3, λ -> 1.603112)
l4 = SphericalLens(-30.28003e-3, 21.29033e-3, 0.5e-3, 22.31297e-3, λ -> 1.764500)
l5 = SphericalLens(23.06904e-3, 243.5999e-3, 3.2e-3, 22.12162e-3, λ -> 1.963000)
l3 = SphericalLens(100.3834e-3, 16.72327e-3, 1e-3, 28.00995e-3, ConstantRefractiveIndex(1.603112))
l4 = SphericalLens(-30.28003e-3, 21.29033e-3, 0.5e-3, 22.31297e-3, ConstantRefractiveIndex(1.764500))
l5 = SphericalLens(23.06904e-3, 243.5999e-3, 3.2e-3, 22.12162e-3, ConstantRefractiveIndex(1.963000))

l_3 = l_2 + BeamletOptics.thickness(l2) + 1.1e-3
l_4 = l_3 + BeamletOptics.thickness(l3) + 7.25496e-3
Expand All @@ -30,19 +30,19 @@ translate3d!(l5, [0, l_5, 0])
variator_group = ObjectGroup([l3, l4, l5])

## compensator
l6 = SphericalLens(-24.31747e-3, -255.5571e-3, 1e-3, 17.70449e-3, λ -> 1.638539)
l6 = SphericalLens(-24.31747e-3, -255.5571e-3, 1e-3, 17.70449e-3, ConstantRefractiveIndex(1.638539))
compensator = l6

l_6 = l_5 + BeamletOptics.thickness(l5) + 40.889e-3
translate3d!(l6, [0, l_6, 0])

# master I
l7 = SphericalLens(Inf, Inf, 1.2e-3, 19.896e-3, λ -> 1.516330)
l8 = SphericalLens(1207.65e-3, -28.39078e-3, 2.4e-3, 21.05932e-3, λ -> 1.583126)
l9 = SphericalLens(74.34233e-3, -62.52319e-3, 2.4e-3, 21.61478e-3, λ -> 1.570989)
l10 = SphericalLens(42.10459e-3, -128.0055e-3, 2.4e-3, 20.88128e-3, λ -> 1.583126)
l11 = SphericalLens(28.62223e-3, 378.3789e-3, 2.4e-3, 19.26452e-3, λ -> 1.651000)
l12 = SphericalLens(-40.92189e-3, 41.10496e-3, 1e-3, 18.17719e-3, λ -> 1.854779)
l7 = SphericalLens(Inf, Inf, 1.2e-3, 19.896e-3, ConstantRefractiveIndex(1.516330))
l8 = SphericalLens(1207.65e-3, -28.39078e-3, 2.4e-3, 21.05932e-3, ConstantRefractiveIndex(1.583126))
l9 = SphericalLens(74.34233e-3, -62.52319e-3, 2.4e-3, 21.61478e-3, ConstantRefractiveIndex(1.570989))
l10 = SphericalLens(42.10459e-3, -128.0055e-3, 2.4e-3, 20.88128e-3, ConstantRefractiveIndex(1.583126))
l11 = SphericalLens(28.62223e-3, 378.3789e-3, 2.4e-3, 19.26452e-3, ConstantRefractiveIndex(1.651000))
l12 = SphericalLens(-40.92189e-3, 41.10496e-3, 1e-3, 18.17719e-3, ConstantRefractiveIndex(1.854779))

l_7 = l_6 + BeamletOptics.thickness(l6) + 4.765141e-3
l_8 = l_7 + BeamletOptics.thickness(l7) + 1e-3
Expand All @@ -60,10 +60,10 @@ translate3d!(l12, [0, l_12, 0])
master_group_I = ObjectGroup([l7, l8, l9, l10, l11, l12])

## master II
l13 = SphericalLens(34.65626e-3, -45.71147e-3, 2.4e-3, 15.6e-3, λ -> 1.762001)
l14 = SphericalLens(27.08863e-3, 11.38107e-3, 1e-3, 14.40932e-3, λ -> 1.761821)
l15 = SphericalLens(20.49712e-3, -203.9304e-3, 2.4e-3, 14.40932e-3, λ -> 1.693501)
l16 = SphericalLens(Inf, Inf, 4e-3, 12.92286e-3, λ -> 1.522494)
l13 = SphericalLens(34.65626e-3, -45.71147e-3, 2.4e-3, 15.6e-3, ConstantRefractiveIndex(1.762001))
l14 = SphericalLens(27.08863e-3, 11.38107e-3, 1e-3, 14.40932e-3, ConstantRefractiveIndex(1.761821))
l15 = SphericalLens(20.49712e-3, -203.9304e-3, 2.4e-3, 14.40932e-3, ConstantRefractiveIndex(1.693501))
l16 = SphericalLens(Inf, Inf, 4e-3, 12.92286e-3, ConstantRefractiveIndex(1.522494))

l_13 = l_12 + BeamletOptics.thickness(l12) + 11.97864e-3
l_14 = l_13 + BeamletOptics.thickness(l13) + 0.1e-3
Expand Down
4 changes: 2 additions & 2 deletions docs/src/assets/examples/psfdetector_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ n = 1.5
λ = 1e-6

cs = UniformDiscSource([0, -10mm, 0], [0, 1, 0], 15e-3, λ)
lens = SphericalLens(R1, R2, l, d, x -> n)
lens = SphericalLens(R1, R2, l, d, ConstantRefractiveIndex(n))

psfd = Detector(10e-3)
translate3d!(psfd, [0, 200mm + 0.13mm, 0])
Expand Down Expand Up @@ -41,7 +41,7 @@ A = [0*(1e3)^1, 2.7709219e-8*(1e3)^3, 6.418186e-13*(1e3)^5, -1.5724014e-17*(1e3)
AL75150 = Lens(
EvenAsphericalSurface(radius, d, k, A),
l,
n -> 1.5006520430
ConstantRefractiveIndex(1.5006520430)
)

xrotate3d!(AL75150, deg2rad(-0.5))
Expand Down
2 changes: 1 addition & 1 deletion docs/src/assets/lens_assets/aspherical_lens_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ L3 = Lens(
1.5264e-5*(1e3)^15] # coeffs
),
0.7e-3, # center_thickness
n -> 1.580200 # refractive index
ConstantRefractiveIndex(1.580200) # refractive index
)

xrotate3d!(L3, π/2)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/assets/lens_assets/cylindrical_lens_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ct = 5.9e-3 # center thickness
cylindrical_lens = Lens(
CylindricalSurface(r, d, h),
ct,
n -> 1.517
ConstantRefractiveIndex(1.517)
)

fig_cylindrical = Figure(size=(600, 450))
Expand All @@ -34,7 +34,7 @@ acylindrical_lens = Lens(
[0, 1.1926075e-5*(1e3)^3, -2.9323497e-9*(1e3)^5, -1.8718889e-11*(1e3)^7, -1.7009961e-14*(1e3)^9, 3.5481542e-17*(1e3)^11, 6.5241296e-20*(1e3)^13]
),
7.5e-3,
n -> 1.777
ConstantRefractiveIndex(1.777)
)

fig_acylindrical = Figure(size=(600, 450))
Expand Down
2 changes: 1 addition & 1 deletion docs/src/assets/lens_assets/lens_constructor_showcase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LB1811 = Lens(
SphericalSurface(r1, inch),
SphericalSurface(r2, inch),
l,
n -> 1.5
ConstantRefractiveIndex(1.5)
)

translate3d!(LB1811, [0, 10mm, 0])
Expand Down
6 changes: 3 additions & 3 deletions docs/src/assets/raman_assets/OpenRaman/longpass.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ refractive index `n`, i.e. the beam is refracted at both surfaces.
# Fields

- `shape`: a `PlanoSurfaceSDF` representing the substrate
- `n`: the substrate [`BeamletOptics.RefractiveIndex`](@ref)
- `n`: the substrate [`BeamletOptics.AbstractRefractiveIndex`](@ref)
- `cuton`: the cut-on wavelength in [m]
"""
struct LongpassDichroicMirror{T, N <: BMO.RefractiveIndex} <: BMO.AbstractObject{T}
struct LongpassDichroicMirror{T, N <: BMO.AbstractRefractiveIndex} <: BMO.AbstractObject{T}
shape::BMO.PlanoSurfaceSDF{T}
n::N
cuton::T
Expand All @@ -26,7 +26,7 @@ BMO.refractive_index(lpm::LongpassDichroicMirror, λ::Real)::Float64 = lpm.n(λ)
Spawns a round [`LongpassDichroicMirror`](@ref) at the global origin. The reflective face
is normal to the local y-axis.
"""
function LongpassDichroicMirror(diameter::D, thickness::T, n::BMO.RefractiveIndex, cuton::Real) where {D, T}
function LongpassDichroicMirror(diameter::D, thickness::T, n::BMO.AbstractRefractiveIndex, cuton::Real) where {D, T}
TT = promote_type(D, T)
shape = BMO.PlanoSurfaceSDF(TT(thickness), TT(diameter))
return LongpassDichroicMirror(shape, n, TT(cuton))
Expand Down
4 changes: 2 additions & 2 deletions docs/src/basics/autodiff.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using BeamletOptics, ForwardDiff
# x coordinate of the spot behind a lens that is shifted laterally by `dx`
function spot_x(dx)
T = typeof(dx)
lens = SphericalLens(T(50e-3), T(-50e-3), T(5e-3), T(25e-3), _ -> T(1.5))
lens = SphericalLens(T(50e-3), T(-50e-3), T(5e-3), T(25e-3), ConstantRefractiveIndex(T(1.5)))
translate3d!(lens, [dx, zero(T), zero(T)])
pd = Detector(T(40e-3))
translate3d!(pd, T[0, 0.1, 0])
Expand All @@ -31,7 +31,7 @@ ForwardDiff.derivative(spot_x, 0.0) # ≈ 1.90
```

The parameter can enter anywhere: the pose of a component (`translate3d!`, `rotate3d!`), its
geometry (radii, thicknesses), a refractive index (e.g. `_ -> n0` for the parameter `n0`) or a
geometry (radii, thicknesses), a refractive index (e.g. `ConstantRefractiveIndex(n0)` for the parameter `n0`) or a
source. Many parameters at once are differentiated with `ForwardDiff.gradient` or
`ForwardDiff.jacobian`.

Expand Down
8 changes: 4 additions & 4 deletions docs/src/basics/components/beamsplitters.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ This model acts as a quasi-coating, representing a very thin (zero-thickness) la

## Plate beamsplitters

Plate beamsplitters provide a more sophisticated model by incorporating a substrate with finite thickness and [`BeamletOptics.RefractiveIndex`](@ref). The splitter coating is modeled via a [`ThinBeamsplitter`](@ref) placed flush onto a single face of the substrate. This allows for more realistic simulation of refractive effects such as e.g. beam path displacement and optical path differences caused by the substrate's geometry. Below two concrete implementations are showcased.
Plate beamsplitters provide a more sophisticated model by incorporating a substrate with finite thickness and [`BeamletOptics.AbstractRefractiveIndex`](@ref). The splitter coating is modeled via a [`ThinBeamsplitter`](@ref) placed flush onto a single face of the substrate. This allows for more realistic simulation of refractive effects such as e.g. beam path displacement and optical path differences caused by the substrate's geometry. Below two concrete implementations are showcased.

### Rectangular plate beamsplitter

The [`RectangularPlateBeamsplitter`](@ref) represents a planar, rectangular substrate with a partially reflective coating.

```@docs; canonical=false
RectangularPlateBeamsplitter(::Real, ::Real, ::Real, ::BeamletOptics.RefractiveIndex)
RectangularPlateBeamsplitter(::Real, ::Real, ::Real, ::BeamletOptics.AbstractRefractiveIndex)
```

A common application involves that this type of beamsplitter is paired with a compensator plate. Below an exemplary illustration of such a setup is shown, where the beamsplitter reflects part of the incoming beam perpendiculary. A [`RectangularCompensatorPlate`](@ref) ensures that the parallel path offset is corrected.
Expand All @@ -49,15 +49,15 @@ The depicted system consist of a rectangular beamsplitter (e.g. [BSW26R](https:/
This variant uses a circular substrate. While components of this type often feature a wedge angle to avoid "ghost beams" in practice, e.g. the [BSW26](https://www.thorlabs.com/thorproduct.cfm?partnumber=BSW26), this is not modeled here.

```@docs; canonical=false
RoundPlateBeamsplitter(::Real, ::Real, ::BeamletOptics.RefractiveIndex)
RoundPlateBeamsplitter(::Real, ::Real, ::BeamletOptics.AbstractRefractiveIndex)
```

## Cube beamsplitter

The [`CubeBeamsplitter`](@ref) is composed of two [`RightAnglePrism`](@ref)s with a partially reflective interface at their internal joint. The splitting interface is represented by a [`ThinBeamsplitter`](@ref). As with other beamsplitters in this package, the cube beamsplitter uses scalar reflection and transmission coefficients.

```@docs; canonical=false
CubeBeamsplitter(::Real, ::BeamletOptics.RefractiveIndex)
CubeBeamsplitter(::Real, ::BeamletOptics.AbstractRefractiveIndex)
```

A classic application of cube beamsplitters is in Mach–Zehnder interferometers, where two beamsplitters combine with additional mirrors to form two optical paths that later recombine. The figure below shows a rudimentary Mach–Zehnder arrangement using two cube beamsplitters and two [`RightAnglePrismMirror`](@ref)s:
Expand Down
12 changes: 7 additions & 5 deletions docs/src/basics/components/lenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ A [`Lens`](@ref) can be then constructed with the following function call:


```@docs; canonical=false
Lens(::BeamletOptics.AbstractRotationallySymmetricSurface, ::BeamletOptics.AbstractRotationallySymmetricSurface, ::Real, ::BeamletOptics.RefractiveIndex)
Lens(::BeamletOptics.AbstractRotationallySymmetricSurface, ::BeamletOptics.AbstractRotationallySymmetricSurface, ::Real, ::BeamletOptics.AbstractRefractiveIndex)
```

### Lens constructor example
Expand Down Expand Up @@ -78,6 +78,8 @@ LB1811 = Lens(

![Lens constructor](lens_constructor.png)

The refractive index `n` is a [`BeamletOptics.AbstractRefractiveIndex`](@ref). For a material without dispersion pass a [`ConstantRefractiveIndex`](@ref), e.g. `ConstantRefractiveIndex(1.5)`; use a [`DiscreteRefractiveIndex`](@ref) or a [`SellmeierEquation`](@ref) whenever the result depends on the wavelength.

### SDF-based spherical lenses

In order to model the lens surfaces shown above, the following SDF-based spherical lens shapes have been implemented:
Expand Down Expand Up @@ -145,7 +147,7 @@ L3 = Lens(
1.5264e-5*(1e3)^15] # coeffs
),
0.7e-3, # center_thickness
n -> 1.580200 # refractive index
ConstantRefractiveIndex(1.580200) # refractive index
)
```

Expand All @@ -169,7 +171,7 @@ ct = 5.9e-3 # center thickness
lens = Lens(
CylindricalSurface(r, d, h),
ct,
n -> 1.517
ConstantRefractiveIndex(1.517)
)
```

Expand All @@ -192,7 +194,7 @@ lens = Lens(
[0, 1.1926075e-5*(1e3)^3, -2.9323497e-9*(1e3)^5, -1.8718889e-11*(1e3)^7, -1.7009961e-14*(1e3)^9, 3.5481542e-17*(1e3)^11, 6.5241296e-20*(1e3)^13]
),
7.5e-3,
n -> 1.777
ConstantRefractiveIndex(1.777)
)
```

Expand All @@ -216,7 +218,7 @@ The following image shows the [AC254-150-AB](https://www.thorlabs.com/thorproduc
Doublet lenses with aspherical surfaces, or with a different clear aperture per surface, are specified via the surface types introduced in the [Surface based lens construction](@ref) section.

```@docs; canonical=false
DoubletLens(::BeamletOptics.AbstractRotationallySymmetricSurface, ::BeamletOptics.AbstractRotationallySymmetricSurface, ::BeamletOptics.AbstractRotationallySymmetricSurface, ::Real, ::Real, ::BeamletOptics.RefractiveIndex, ::BeamletOptics.RefractiveIndex)
DoubletLens(::BeamletOptics.AbstractRotationallySymmetricSurface, ::BeamletOptics.AbstractRotationallySymmetricSurface, ::BeamletOptics.AbstractRotationallySymmetricSurface, ::Real, ::Real, ::BeamletOptics.AbstractRefractiveIndex, ::BeamletOptics.AbstractRefractiveIndex)
```

## Triplet lenses
Expand Down
Loading
Loading