Skip to content

Commit

Permalink
Adapt
Browse files Browse the repository at this point in the history
  • Loading branch information
roflmaostc committed Jan 9, 2024
1 parent f5e2122 commit 391ce4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/Scalable_Angular_Spectrum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ The Fresnel number is $(round((D_circ / 2 * L / N)^2 / z_circ / λ, digits=3))
simshow(Array(U_circ))

# ╔═╡ 484704ce-4497-4567-b387-aad06dee6a62
@mytime SAS = ScalableAngularSpectrum(U_circ, z_circ, λ, L)
@mytime SAS, _ = ScalableAngularSpectrum(U_circ, z_circ, λ, L)

# ╔═╡ 9e3f7e53-3fdb-4638-89bc-27bced937193
@time SAS_cpu = ScalableAngularSpectrum(Array(U_circ), z_circ, λ, L)
@time SAS_cpu, _ = ScalableAngularSpectrum(Array(U_circ), z_circ, λ, L)

# ╔═╡ 9ec9d456-a33b-4605-9025-c82676eca7e2
U_circ_cpu = Array(U_circ);
Expand Down Expand Up @@ -130,7 +130,7 @@ The Fresnel number is $(round((D_box)^2 / z_box / λ, digits=3))
"

# ╔═╡ 38bc91ff-3188-4129-aa6b-2af458cf59b1
@mytime SAS2 = ScalableAngularSpectrum(U_box, z_box, λ, L_box, skip_final_phase=true)
@mytime SAS2, _ = ScalableAngularSpectrum(U_box, z_box, λ, L_box, skip_final_phase=true)

# ╔═╡ 2b11c87d-4746-4be6-81f6-f004d30beae4
@mytime U_box_p, t_box = SAS2(U_box)
Expand Down
4 changes: 2 additions & 2 deletions examples/double_slit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ md"# Propagate with Fraunhofer Diffraction"

# ╔═╡ 0c74a49c-e4de-4172-ac75-4c2692c505fb
# creating this function is more efficient!
efficient_fraunhofer = Fraunhofer(slit, z, λ, L);
efficient_fraunhofer, _ = Fraunhofer(slit, z, λ, L);

# ╔═╡ 0e6f74f1-8723-4596-b754-973b253443a4
@time output2, t2 = efficient_fraunhofer(slit)
Expand Down Expand Up @@ -160,7 +160,7 @@ fwd = let z=z, L=L, λ=λ
end

# ╔═╡ c9651b37-d911-4230-a2f5-f94e8f726fbc
fwd2 = let z=z, L=L, λ=λ, fr=Fraunhofer(rec0 .+ 0im, z, λ, L)
fwd2 = let z=z, L=L, λ=λ, fr=Fraunhofer(rec0 .+ 0im, z, λ, L)[1]
x -> fr(x .+ 0im)
end

Expand Down

0 comments on commit 391ce4a

Please sign in to comment.