Skip to content

Commit dd5f210

Browse files
committed
Update tests and example
1 parent 9f9c13d commit dd5f210

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

examples/example.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,13 @@ begin
102102
end
103103

104104
# ╔═╡ 720bc546-8196-4210-9cb2-364799951ccf
105-
md"# Plot simple Lens system"
106-
107-
# ╔═╡ 059ac4bf-5b38-4d26-9191-0d49897214ad
108-
105+
md"# Plot Simple Lens system"
109106

110107
# ╔═╡ 1a9aef8d-80a0-4dc2-9f63-3bd9ee52d58d
111108
tl1 = ThickLens(R1=100, R2=-100, t=0)
112109

113110
# ╔═╡ 3832f547-0d24-4688-b77d-453053e577ea
114-
tl2 = ThickLens(R1=200, R2=-200, t=0)
111+
tl2 = ThickLens(R1=200, R2=-200, t=50)
115112

116113
# ╔═╡ 38ecda12-6e81-4035-ad40-9498334471e7
117114
tl1.focal_length
@@ -125,6 +122,7 @@ M2 = [f2, tl1, f12, tl2, f1]
125122
# ╔═╡ ad8215d3-901e-4629-98c0-ee56533e5c1c
126123
begin
127124
plot(M2, beam)
125+
# specify the height and it'll show the lens with that height
128126
plot!(M2, height=40)
129127
end
130128

@@ -181,8 +179,7 @@ plot(system2, b2)
181179
# ╟─8faab7e3-56a9-4218-b187-7039dd43cb7b
182180
# ╠═5844cbf9-1551-4124-a168-5c7e1d4e4746
183181
# ╠═332416d5-91b8-497b-8d5e-57d8e1bc9a4d
184-
# ╠═720bc546-8196-4210-9cb2-364799951ccf
185-
# ╠═059ac4bf-5b38-4d26-9191-0d49897214ad
182+
# ╟─720bc546-8196-4210-9cb2-364799951ccf
186183
# ╠═1a9aef8d-80a0-4dc2-9f63-3bd9ee52d58d
187184
# ╠═3832f547-0d24-4688-b77d-453053e577ea
188185
# ╠═38ecda12-6e81-4035-ad40-9498334471e7

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ using Plots
123123
for λ in [100e-9, 500e-9]
124124
for beam in [GaussianBeam(w0=100e-6, λ=λ, n=1.3, zpos=0), GeometricBeam(w=100e-6, k=0.0)]
125125
p = plot([FreeSpace(100e-3)], beam)
126-
p = plot!([FreeSpace(100e-3), ThinLens(100e-3), Thicklens(R1=100e-3, R2=200e-3, t=0.0)], height=10)
126+
p = plot!([FreeSpace(100e-3), ThinLens(100e-3), ThickLens(R1=100e-3, R2=-200e-3, t=0.0)], height=10e-3)
127127
@test p == p
128128
end
129129
end

0 commit comments

Comments
 (0)