-
Notifications
You must be signed in to change notification settings - Fork 0
/
HW05_in_class.jl
2324 lines (1859 loc) · 78.8 KB
/
HW05_in_class.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### A Pluto.jl notebook ###
# v0.19.40
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
local el = $(esc(element))
global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el)
el
end
end
# ╔═╡ d1980bd2-babf-11ee-1dbb-dfefbdbdb36d
using PlutoUI, Plots, ImageShow, TestImages, FFTW, NDTools, IndexFunArrays, FileIO, FourierTools, SpecialFunctions, UrlDownload, ImageMagick
# ╔═╡ 17adc747-9822-42be-91c1-ad8a2e1532bc
md"# 0. Load packages"
# ╔═╡ d2c6102c-7a62-4899-9c5c-b08ce9a5baa8
FFTW.set_num_threads(4)
# ╔═╡ 8e6ec43c-9135-4829-8146-a56b8624750a
const TODO = nothing
# ╔═╡ 7331d6a5-dd03-42c7-9ab3-c84a641296bc
TableOfContents()
# ╔═╡ f326cd36-9c05-4b1c-81c0-56c954cd51f3
gauss_R(z::T, z_R) where T = iszero(z) ? T(Inf) : (1 + (z_R / z)^2)
# ╔═╡ 7c6b4ddd-ca5a-4b23-96f7-e896fb1cda6d
gauss_ψ(z, z_R) = atan(z, z_R)
# ╔═╡ dd16735b-c1d6-4977-a396-a3e23823ee68
gauss_w(z, z_R, w_0) = w_0 * sqrt(1 + (z / z_R)^2)
# ╔═╡ 8e04ae26-5474-4c2c-9fda-dbb7efd77acd
"""
gauss_beam(y, x, z, λ, w_0)
Returns the eletrical field of a Gaussian beam at position `(y, x)` at optical axis position `z` with respect to the beam waist `w_0`.
Wavelength is `λ`.
"""
function gauss_beam(y, x, z, λ, w_0)
k = π / λ * 2
z_R = π * w_0^2 / λ
r² = x ^ 2 + y ^ 2
# don't put exp(i * k * z) into the same exp, it causes some strange wraps
return w_0 / gauss_w(z, z_R, w_0) * exp(-r² / gauss_w(z, z_R, w_0)^2) *
exp(1im * k * z) *
exp(1im * (k * r² / 2 / gauss_R(z, z_R) - gauss_ψ(z, z_R)))
end
# ╔═╡ 5f21a849-0272-4bca-9659-54cd38068e09
"""
bpm(field, λ0, Lx, Ly, z; window=true, paraxial=true, amplitude_array)
Propagates the array `field` with wavelength `λ0` and the filed size in meter size
`(Lx, Ly)`. The propagation distance `z` should be a vector of distances.
.
The returned array is a three dimensional array where `size(arr, 3) == size(z, 1)`.
If `window=true` we apply a Hann window function to dampen the boundaries.
A keyword `amplitude_array` can be provided, which multiplies with the field at each point. This allows to include obstacles.
If `paraxial=true` the Fresnel approximation is applied.
"""
function bpm(field, λ0, Lx, Ly, z, n=1; window=true, amplitude_array=ones(size(field)..., length(z)), paraxial=true)
# free space wavenumber in m-1
k0 = 2 * π / λ0
# medium wavenumber m-1
k = n * k0
# medium in m
dz = z[2] - z[1]
# field parameters
Nx = size(field, 1)
dx = Lx / Nx
x = range(-Lx/2, Lx/2, Nx)
fx = reshape(fftfreq(Nx, 1 / dx), (1, Nx))
Ny = size(field, 1)
dy = Ly / Ny
y = range(-Ly/2, Ly/2, Ny)
fy = fftfreq(Ny, 1 / dy)
if paraxial
# important step, this calculates the Fourier space kernel
H = exp.(-1im .* k .* λ0^2 .* (fx.^2 .+ fy.^2) ./ (2) * dz)
else
H = exp.(1im .* sqrt.(1 .+ 0im .- λ0^2 .* fx.^2 .- λ0^2 .* fy.^2) .* k .* dz) .* ((λ0^2 .* fx.^2 .+ λ0^2 .* fy.^2) .< 1)
end
# 3d output fields we save
# third dimensions stores the different z propagation distances
out_field = zeros(ComplexF64, (Ny, Nx, size(z, 1)))
# first entry corresponds to z[1] = 0
out_field[:, :, 1] = field
# FFT plan for calculating FFTs
# It's a more efficient syntax: p * x == fft(x)
p = plan_fft(field, (1,2))
window_f = window ? IndexFunArrays.window_hanning(size(out_field)[1:2], border_in=0.8) : 1
# inverse FFT
invp = inv(p)
for z_index in 2:size(out_field, 3)
u0 = out_field[:, :, z_index - 1] .* window_f .* amplitude_array[:, :, z_index - 1]
u1 = invp * ((p * u0) .* H)
out_field[:, :, z_index] .= u1
end
return out_field
end
# ╔═╡ 1938a0dd-ffec-478e-870c-18d14f458f6e
md"# 1. Coherent Imaging with a 4f system
As seen in the image below, a 4f system consists of two lenses.
The object is placed 1f in front of the first lens and the image is located 1f behind the second lens.
In the middle, the Fourier plane is located.
Given the electrical field at the input plane, we can perform a Fourier transform to obtain the Fourier plane. At the Fourier plane we can apply the aperture function (pointwise multiplication `.*`).
A final Fourier transform provides us the electrical field at the exit.
At the image plane we take `abs` to obtain the amplitude.
If the fast discrete Fourier transform (FFT) is applied, there happens a scaling between the fields:
$$U'(x', y') = \mathcal{F}[U(x,y)](x', y')$$
where $x' = \frac{\lambda \cdot f \cdot N}{L}$
$f$ is the focal length of the lens, $\lambda$ the wavelength, $L$ the field size and $N$ the discretization along one axis.
"
# ╔═╡ 8812ba45-091d-4b07-b941-0c51a6f8d198
urldownload("https://d3i71xaburhd42.cloudfront.net/9d8bdf497732e41e31f871b438d58263ab5a4b54/2-Figure2-1.png")
# ╔═╡ 21b57718-25bc-4143-a383-90124f561eea
md"## Question
Fill in the missing gaps for the circular aperture in the Fourier plane.
You can use `rr` and the `scale` keyword in the `rr` function.
To verify your solution, the cut-off radius of the aperture is $\approx 2\mathrm{mm}$
"
# ╔═╡ 2386c0bf-30d2-41e2-a085-6c422baf16a2
function prop_4f(field, λ, f, L, radius_aperture)
field_padded = select_region(field, M = 2)
L_padded = 2 * L
field_ft = ft(field_padded)
L_ft = λ * size(field_ft, 1) * f / L_padded
aperture = rr(size(field_ft), scale=L_ft/size(field_ft, 1)) .<= radius_aperture
field_ft .*= aperture
field_out = select_region(ift(field_ft), new_size=size(field))
return (field_out)
end
# ╔═╡ d2f60c2f-9745-4fe0-bf9d-8f7d5877ea39
rr((5,5), scale=0.1)
# ╔═╡ 50358b73-9736-4195-98a0-b5f79b8cd150
begin
img = sqrt.(Float32.(testimage("resolution_test_512")));
img[490:512, :] .= 0.5 .* (1 .+ sin.((fftpos(512, 512, CenterFT)) .* π .* 2 / 8))'
#img[:, :] .= 0.5 .* (1 .+ sin.((fftpos(512, 512, CenterFT)) .* π .* 2 / 8))'
end;
# ╔═╡ da84b8e5-374c-4970-990f-a99d70632f24
size(img, 1)
# ╔═╡ 64fba384-d96e-4895-9e2a-1bc03fb839ef
simshow([img img])
# ╔═╡ c7bdd3a3-59f2-451f-8ccb-0fdff26abc53
L = 2e-3
# ╔═╡ 0c9fcd30-c779-46ba-a231-0b421e2ccbdd
y = fftpos(L, size(img, 1), CenterFT)
# ╔═╡ 6feb5de4-dbf9-45cf-beda-28adee3564c5
x = y'
# ╔═╡ c5093acf-bb4e-402c-a1fa-430cafd9b523
λ = 633e-9
# ╔═╡ 0c936df2-e9bf-48e0-bb9a-42728b14af43
f = 100e-3
# ╔═╡ ab3a0a7d-9f4c-4bbf-b2f3-61e0e1f3a970
@bind radius Slider(range(0, 10e-3, 100), show_value=true, default=0.001)
# ╔═╡ 9019367d-2592-4401-9f38-217451c58492
img_prop_coherent = prop_4f(img, λ, f, L, radius);
# ╔═╡ 4572348d-d9d1-448d-9121-617e74de3a0e
heatmap(y, y, simshow(abs2.(img_prop_coherent)), xlim=(y[begin], y[end]))
# ╔═╡ b2e93c0b-9413-4cc2-a917-ae51963bd100
md"# 2. Incoherent Imaging
Incoherent imaging means that two neighbouring points are not coherent and hence do not interfere with each other.
A similar effect can be achieved by adding random phase shifts to the field.
Use the code below and add at the right position random phase shifts.
Which random values of the phase you have to choose?
See `randn` and the `rand` functions. Which is the correct one?
Use the code below and fix it at the right position.
"
# ╔═╡ 24c9fcf8-b13e-44e9-9982-c61e73a34240
function prop_4f_incoherent(field, λ, f, L, radius_aperture, N_iter=50)
intensity = zeros((size(field)..., Threads.nthreads()))
Threads.@threads for k in 1:N_iter
random_phase = exp.(1im .* 2π .* rand(size(field)...))
field_padded = select_region(field .* random_phase, M = 2)
L_padded = 2 * L
field_ft = ft(field_padded)
L_ft = λ * f / L_padded * size(field_padded, 1)
aperture = rr(size(field_ft), scale=L_ft / size(field_padded, 1)) .<= radius_aperture
aperture = aperture
field_ft .*= aperture
field_out = select_region(ift(field_ft), new_size=size(field))
intensity[:, :, Threads.threadid()] .+= abs2.(field_out)
end
return sum(intensity, dims=(3,))[:, :, 1] ./ sqrt(N_iter)
end
# ╔═╡ b5a50850-ce01-49db-bb12-55adba69fc9c
img_prop_incoherent = prop_4f_incoherent(img, λ, f, L, radius);
# ╔═╡ f1341836-0297-49e4-a21d-7b8cbcc8fd59
heatmap(y,y, simshow(img_prop_incoherent), xlim=(y[begin], y[end]))
# ╔═╡ a72ff4fa-70a8-4088-b393-17daaabd6c19
md"## Question
Is the incoherent imaging better than the coherent one?
Explain what is the resolution limit between the two?
What is the resolution limit for the coherent one and what for the incoherent one?
"
# ╔═╡ 2f32c085-1d6b-4858-be6f-9bfc280c2695
md"## Answer
$$x_c = \frac{\lambda}{\text{NA}}$$
$$x_i = \frac{\lambda}{2\text{NA}}$$
"
# ╔═╡ 447ab89c-6fec-4dad-8cd5-7ccc3ef3c275
md"# 3. True Incoherent Imaging - Point Spread Function
True incoherent imaging can be described more efficiently than just adding randomly phased shifted fields.
To describe the imaging process, we can use the point spread function (PSF).
The PSF is the image of a point source and is the response of the imaging system to a point source.
It can be calculated by coherently propagating a point source through the imaging system. And then taking the `abs2` of the field at the image plane.
* propagate point source with `ft`
* apply circular aperture. Use again the `rr` function to create a circular aperture. Use the `scale=L_ft / N` to have the correct scaling of the aperture. `L_ft = λ * f / L * N` is the scaling factor for the aperture.
* propagate with another `ft`
* take `abs2.`
"
# ╔═╡ 002c1f76-ca75-43d5-a294-8f1c3cd5da56
@bind radius_psf Slider(range(0, 10e-3, 100), default=0.001, show_value=true)
# ╔═╡ 41f3b42a-49f5-485e-b1ef-fa8f24e85a42
"""
calc_psf(N, λ, f, L, radius_aperture)
`N` is the pixel number of the field.
`λ` is the wavelength.
`f` is the focal length of the lens.
`L` is the field size.
`radius_aperture` is the radius of the aperture in meter.
"""
function calc_psf(N, λ, f, L, radius_aperture)
field = delta((N, N))
field_ft = ft(field)
L_ft = λ * f / L * N
aperture = rr((N, N), scale=L_ft / N) .< radius_aperture
aperture = aperture ./ length(aperture)
field_ft = field_ft .* aperture
intensity_detector = abs2.(ft(field_ft))
psf = intensity_detector ./ sum(intensity_detector)
return psf
end
# ╔═╡ 41e06229-d84c-4d5e-a3de-57da92e93bf4
psf = calc_psf(size(img, 1), λ, f, L, radius);
# ╔═╡ a4284aa6-097d-4ed4-a8aa-2c6dada33e7d
simshow(psf)
# ╔═╡ 0535e742-de35-40e9-b072-c60710959bdf
simshow(abs.(jinc.(rr(size(psf), scale=0.2)).^2))
# ╔═╡ 90837c30-4886-4701-9c60-da945fe9ff14
heatmap(y,y, simshow(psf), xlim=(y[begin], y[end]))
# ╔═╡ b5f3df13-2aa2-4c0c-bb9a-b07bb0190e91
heatmap(y,y, simshow(img_prop_incoherent), xlim=(y[begin], y[end]))
# ╔═╡ 66ea19ac-e8c1-4b62-bc05-9386a44e0d85
md"## Question
Convolve the `img` with `psf` and compare again with `img_prop_incoherent` and `img_prop_coherent`.
Can you observe better resolution again?
"
# ╔═╡ cbfa1584-312c-4e43-b949-2c5139c59d6a
md"## Answer
Yes we can.
"
# ╔═╡ 6e44b629-f5a9-4724-98f3-b864659d35a5
function my_conv(img, psf)
real.(ift(ft(img) .* ft(psf)))
end
# ╔═╡ 7f0ff049-bfbc-45e4-8ae0-e8cb4c2274eb
real.(ift(ft(img) .* ft(psf))) ≈ abs.(ift(ft(img) .* ft(psf)))
# ╔═╡ 9c626ddd-2b39-427b-a598-46db2b619af9
@time ift(ft(img) .* ft(psf));
# ╔═╡ 0b2e60c1-f11f-4197-bd7d-84902c8ec5fb
@time irft(rft(img) .* rft(psf), size(psf, 1));
# ╔═╡ 25e6b2b1-164c-426f-9ffa-3b26e4cc315f
ift(ft(img) .* ft(psf));
# ╔═╡ 57b8cfb2-a26d-4b06-9320-21ffb69bbb55
img_incoherent_psf = my_conv(abs2.(img), psf);
# ╔═╡ 5bc460dd-68d2-4326-b6b5-993efd9486e6
heatmap(y,y, simshow(img_incoherent_psf), xlim=(y[begin], y[end]))
# ╔═╡ 0ef096a9-3979-461e-8642-5e362c8cfc65
md"# 4. Imaging two Gaussians
Now we want to image two Gaussians blobs.
First use the `prop_4f` for coherent propagation.
Then use `prop_4f_incoherent`.
Additionally, apply a global phase shift of `π` to `blob2`.
And then image again with coherent and incoherent.
Provide a plot of the cross section of all the four images.
Normalize them to 1 with `maxnormf`.
"
# ╔═╡ 74f0d4f6-22e3-4628-88b8-e450e4c82a1b
sz4 = (64, 64)
# ╔═╡ b87cceb8-dc09-44e9-92ee-74c5c329e83b
λ4 = 633e-9
# ╔═╡ bc124403-07dc-47a9-8557-d83ec4096ed9
L4 = sz4[1] * λ4 / 2
# ╔═╡ 658f936c-ce5e-460c-a8e7-d6b40a6dad73
f4 = 100f-3
# ╔═╡ 33d74a95-7144-4654-b841-a3b735fa85ee
blob1 = disc(sz4, 6, offset=(20, 30));
# ╔═╡ b18ebc68-9ee3-4585-bd0a-647589e9f08f
blob2 = disc(sz4, 6, offset=(37, 30));
# ╔═╡ 376cc9a8-8c02-4d9b-846a-f3e31e69a5d9
blobs_coherent = abs2.(prop_4f(blob1 .+ blob2, λ4, f4, L4, 8e-3));
# ╔═╡ 6089a4ae-ea45-4283-9f16-0bd87b77f514
blobs_phase = abs2.(prop_4f(blob1 .+ blob2 .* exp(1im * π), λ4, f4, L4, 8e-3));
# ╔═╡ 27137726-297d-4771-a8a1-752f91f4f4f2
blobs_incoherent = abs2.(prop_4f_incoherent(blob1 .+ blob2, λ4, f4, L4, 8e-3));
# ╔═╡ c460493c-79b9-44f0-983f-ab659d08568b
blobs_incoherent_phase = abs2.(prop_4f_incoherent(blob1 .+ blob2 .* exp(1im * π), λ4, f4, L4, 8e-3));
# ╔═╡ 7c32e38c-9eea-4940-a9d5-cfbffeeb291b
[simshow(blobs_coherent) simshow(blobs_incoherent) simshow(blobs_phase)]
# ╔═╡ 0402636e-e4eb-48c1-a1c6-9625aeee5d93
maxnormf(x) = x ./ maximum(x)
# ╔═╡ e9670f97-99b4-423c-861b-d3b460af7c6c
md"## Question
What differences do you observe between all the images? Which has the best resolution?
"
# ╔═╡ 97bd88c4-18db-40e1-a116-081d31ca07b4
md"## Answer
See [Horstmeyer, Roarke, et al. \"Standardizing the resolution claims for coherent microscopy.\" Nature Photonics 10.2 (2016): 68-71.](https://rdcu.be/dBL9X):
_Consider two point sources separated by a small distance and emitting mutually incoherent light, which are resolved at the Rayleigh limit (that is, just separated by a clear dip in intensity) when imaged by a specific microscope. The same point sources in the same locations will not be resolved by the same microscope (that is, will appear as only one large spot) if the sources are instead emitting light that is coherent and in-phase. However, the two sources become fully 'resolved' when their emissions are in anti-phase (that is, shifted by π radians) to each other._
_This means that the intensity profile of an image rendered by a coherent imaging system is phase dependent. As such, simply measuring and reporting its intensity response is an unsuitable means to characterize resolution in an unambiguous manner. Further compounding the issue, many recent coherent imaging methods rely on computational post-processing, with a digitally manipulated image formation pipeline. Another factor that needs to be taken into account is the presence of noise, which can impact image quality and resolution limits4, but is challenging to encompass within a single measurement or scalar performance metric._
"
# ╔═╡ ac39b3f4-7cd8-4c57-a6c2-c4bddd958181
md"# 5. Pinhole Imaging
Let's do imaging through a pinhole.
For that we propagate the object a certain distance before a pinhole.
Then we multiply with a small pinhole.
Finally we perform a far field propagation, hence a `ft` operation to a screen.
## Question
* Find a good value for the aperture radius such that you see an image of Fabio. Can you quantitatively argue why this value works?
* Why do we need an incoherent propagation and why does the coherent one fail?
"
# ╔═╡ dad298c5-e25b-4326-a2a6-14daa15767af
"""
angular_spectrum(field, z, λ, L)
Returns the the electrical field with physical length `L` and wavelength `λ` propagated with the angular spectrum method of plane waves (AS) by the propagation distance `z`.
"""
function angular_spectrum(field::Matrix{T}, z, λ, L; pad_factor = 2) where T
@assert size(field, 1) == size(field, 2) "Restricted to quadratic fields."
# we need to apply padding to prevent circular convolution
L_new = pad_factor .* L
# applies zero padding
field_new = select_region(field, new_size=size(field) .* pad_factor)
# helpful propagation variables
k = 2π / λ
N = size(field_new, 1)
f_y = similar(field, real(eltype(field)), (N,1))
f_y .= fftfreq(N, N / L_new)
f_x = f_y'
# transfer function kernel of angular spectrum
H = exp.(1im .* k .* z .* sqrt.(0im .+ 1 .- abs2.(f_x .* λ) .- abs2.(f_y .* λ)))
# bandlimit according to Matsushima
# and fuzzy logic
Δu = 1 / L_new
u_limit = 1 / (sqrt((2 * Δu * z)^2 + 1) * λ)
# bandlimit filter
W = ((abs2.(f_y) ./ u_limit^2 .+ abs2.(f_x) * λ^2) .< 1) .*
((abs2.(f_x) ./ u_limit^2 .+ abs2.(f_y) * λ^2) .< 1)
# propagate field
field_out = fftshift(ifft(fft(ifftshift(field_new)) .* H .* W))
# take center part because of circular convolution
field_out_cropped = select_region(field_out, new_size=size(field))
# return final field and some other variables
return field_out_cropped, (;H, W)
end
# ╔═╡ 897a0965-f495-4c82-aee8-60f5599778cb
fabio = sqrt.(Float32.(testimage("fabio_gray_256")))[begin:2:end, begin:2:end] .+ 0im;
# ╔═╡ 37ad4839-dcce-40db-b890-258613cc98f8
heatmap(y,y, simshow(fabio), xlim=(y[begin], y[end]))
# ╔═╡ a1b76d0d-deed-401b-a452-6c3f46e9654c
"""
coherent_pinhole_camera(img, z, λ, L; radius=1e-3)
`img` is the input field. `z` is the propagation distance between object an pinhole.
`λ` is the wavelength. `L` is the size of the input image.
`radius` is the aperture radius in meters.
"""
function coherent_pinhole_camera(img, z, λ, L; radius=1e-3)
dx = L / size(img, 1)
pinhole = rr(size(img), scale=dx) .<= radius;
part1, t = angular_spectrum(img, z, λ, L);
part2 = ft(part1 .* pinhole)
out = abs2.(part2)
return out
end
# ╔═╡ 26acacc8-c70b-4e87-9336-241712503762
"""
incoherent_pinhole_camera(img, z, λ, L; radius=1e-3, N=200)
`img` is the input field. `z` is the propagation distance between object an pinhole.
`λ` is the wavelength. `L` is the size of the input image.
`radius` is the aperture radius in meters.
This function averages over `N` images with random phase, this simulates incoherent light.
"""
function incoherent_pinhole_camera(img, z, λ, L; radius=1e-3, N=200)
dx = L / size(img, 1)
out = zeros((size(img)..., Threads.nthreads()))
pinhole = rr(size(img), scale=dx) .<= radius;
Threads.@threads for _ in 1:N
part1, t = angular_spectrum(img .* cis.(2π .* rand(size(img)...)), z, λ, L);
part2 = ft(part1 .* pinhole)
out[:, :, Threads.threadid()] .+= abs2.(part2)
end
return sum(out, dims=(3,))[:, :, 1]
end
# ╔═╡ 6fc457d8-6e9b-45e1-9435-898aebbd2108
z5 = 0.2
# ╔═╡ d0485b3b-7ef6-43d1-a347-4164c626d10e
L5 = 0.004
# ╔═╡ d5f96173-4027-411a-b2aa-ab24c29dbe9b
y4 = fftpos(L5, sz4[1], CenterFT);
# ╔═╡ 71356c5e-6d9a-4227-bba9-0cbb527fcf48
begin
plot(y4, maxnormf(blobs_coherent)[:,30], label="coherent blobs")
plot!(y4, maxnormf(blobs_phase)[:,30], label="coherent but phase")
plot!(y4, maxnormf(blobs_incoherent)[:,30], label="incoherent")
plot!(y4, maxnormf(blobs_incoherent_phase)[:,30], label="incoherent phase")
end
# ╔═╡ f5664869-f2a2-42de-9467-5bc6c1857ec1
radius_pinhole = 0.27e-3
# ╔═╡ a21bdc4f-c712-4bc0-a64b-ca76b31ca1ee
λ5 = λ
# ╔═╡ 329226da-4794-48c0-b143-799b2c666378
fabio_pinhole_c = coherent_pinhole_camera(fabio, z5, λ5, L5, radius=radius_pinhole);
# ╔═╡ a096cd69-9a00-4b28-8d7f-1aa8c7b95a00
fabio_pinhole = incoherent_pinhole_camera(fabio, z5, λ5, L5, radius=radius_pinhole, N=1000);
# ╔═╡ 1863f777-ed76-4e28-a82c-c01e57888331
L5^2 / λ5 / size(fabio, 1)
# ╔═╡ f7c5163f-e364-4af1-bc92-4583b01d0de8
[simshow(fabio_pinhole_c) simshow(fabio_pinhole |> reverse) simshow(abs2.(fabio))]
# ╔═╡ 1ccea702-b279-434f-8631-c02c2528b6d3
√(λ5 * z5 * 2) / 2
# ╔═╡ a0456ef6-fce0-4906-ba81-fec7b6f3d334
md"## Answer
The pinhole camera can be easily understood from geometrical optics perspective.
If we would have a coherent signal only, most of the light will be simply blocked by the aperture since the light travels mostly straight.
To find the best radius $r = D / 2$ we have to find the optimum regime between geometrical and wave optics.
From geometrical optics, the smaller $D$ is, the better the resolution (small $B_G$).
However, the smaller $D$, wave optics will produce a large diffraction spot (Fraunhofer Diffraction).
The optimum is, when both are equal
$$B_G = B_W$$
$$2D = 2.44 λ z / D $$
$$D ≈ \sqrt{\lambda z}$$
"
# ╔═╡ 123fcda7-e0be-4d91-9ed7-d6bebc2840c2
urldownload("https://felix.sumpi.org/pinhole_camera.png")
# ╔═╡ d70e8383-813b-4802-9c76-3328b25e131e
mm = randn((256,256))
# ╔═╡ 06ea5301-843a-4069-8a76-2981457dc22d
@time ft(mm);
# ╔═╡ 96eeab44-8a57-4391-999c-e2e219d86bc7
@time fftshift(fft(ifftshift(mm)));
# ╔═╡ 00000000-0000-0000-0000-000000000001
PLUTO_PROJECT_TOML_CONTENTS = """
[deps]
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
FourierTools = "b18b359b-aebc-45ac-a139-9c0ccbb2871e"
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
ImageShow = "4e3cecfd-b093-5904-9786-8bbb286a6a31"
IndexFunArrays = "613c443e-d742-454e-bfc6-1d7f8dd76566"
NDTools = "98581153-e998-4eef-8d0d-5ec2c052313d"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990"
UrlDownload = "856ac37a-3032-4c1c-9122-f86d88358c8b"
[compat]
FFTW = "~1.8.0"
FileIO = "~1.16.2"
FourierTools = "~0.4.2"
ImageMagick = "~1.3.1"
ImageShow = "~0.3.8"
IndexFunArrays = "~0.2.7"
NDTools = "~0.5.3"
Plots = "~1.40.1"
PlutoUI = "~0.7.58"
SpecialFunctions = "~2.3.1"
TestImages = "~1.8.0"
UrlDownload = "~1.0.1"
"""
# ╔═╡ 00000000-0000-0000-0000-000000000002
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
julia_version = "1.10.2"
manifest_format = "2.0"
project_hash = "ffb86d99bd63553bfe12a8756e80f51b06915622"
[[deps.AbstractFFTs]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef"
uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c"
version = "1.5.0"
weakdeps = ["ChainRulesCore", "Test"]
[deps.AbstractFFTs.extensions]
AbstractFFTsChainRulesCoreExt = "ChainRulesCore"
AbstractFFTsTestExt = "Test"
[[deps.AbstractNFFTs]]
deps = ["LinearAlgebra", "Printf"]
git-tree-sha1 = "292e21e99dedb8621c15f185b8fdb4260bb3c429"
uuid = "7f219486-4aa7-41d6-80a7-e08ef20ceed7"
version = "0.8.2"
[[deps.AbstractPlutoDingetjes]]
deps = ["Pkg"]
git-tree-sha1 = "0f748c81756f2e5e6854298f11ad8b2dfae6911a"
uuid = "6e696c72-6542-2067-7265-42206c756150"
version = "1.3.0"
[[deps.Adapt]]
deps = ["LinearAlgebra", "Requires"]
git-tree-sha1 = "0fb305e0253fd4e833d486914367a2ee2c2e78d0"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
version = "4.0.1"
[deps.Adapt.extensions]
AdaptStaticArraysExt = "StaticArrays"
[deps.Adapt.weakdeps]
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
[[deps.ArgCheck]]
git-tree-sha1 = "a3a402a35a2f7e0b87828ccabbd5ebfbebe356b4"
uuid = "dce04be8-c92d-5529-be00-80e4d2c0e197"
version = "2.3.0"
[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
version = "1.1.1"
[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
[[deps.AxisArrays]]
deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"]
git-tree-sha1 = "16351be62963a67ac4083f748fdb3cca58bfd52f"
uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9"
version = "0.4.7"
[[deps.BangBang]]
deps = ["Compat", "ConstructionBase", "InitialValues", "LinearAlgebra", "Requires", "Setfield", "Tables"]
git-tree-sha1 = "7aa7ad1682f3d5754e3491bb59b8103cae28e3a3"
uuid = "198e06fe-97b7-11e9-32a5-e1d131e6ad66"
version = "0.3.40"
[deps.BangBang.extensions]
BangBangChainRulesCoreExt = "ChainRulesCore"
BangBangDataFramesExt = "DataFrames"
BangBangStaticArraysExt = "StaticArrays"
BangBangStructArraysExt = "StructArrays"
BangBangTypedTablesExt = "TypedTables"
[deps.BangBang.weakdeps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9"
[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[deps.Baselet]]
git-tree-sha1 = "aebf55e6d7795e02ca500a689d326ac979aaf89e"
uuid = "9718e550-a3fa-408a-8086-8db961cd8217"
version = "0.1.1"
[[deps.BasicInterpolators]]
deps = ["LinearAlgebra", "Memoize", "Random"]
git-tree-sha1 = "3f7be532673fc4a22825e7884e9e0e876236b12a"
uuid = "26cce99e-4866-4b6d-ab74-862489e035e0"
version = "0.7.1"
[[deps.BitFlags]]
git-tree-sha1 = "2dc09997850d68179b69dafb58ae806167a32b1b"
uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35"
version = "0.1.8"
[[deps.Bzip2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd"
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
version = "1.0.8+1"
[[deps.CEnum]]
git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc"
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
version = "0.5.0"
[[deps.Cairo_jll]]
deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2"
uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a"
version = "1.16.1+1"
[[deps.ChainRulesCore]]
deps = ["Compat", "LinearAlgebra"]
git-tree-sha1 = "575cd02e080939a33b6df6c5853d14924c08e35b"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.23.0"
weakdeps = ["SparseArrays"]
[deps.ChainRulesCore.extensions]
ChainRulesCoreSparseArraysExt = "SparseArrays"
[[deps.CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
git-tree-sha1 = "59939d8a997469ee05c4b4944560a820f9ba0d73"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.7.4"
[[deps.ColorSchemes]]
deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"]
git-tree-sha1 = "67c1f244b991cad9b0aa4b7540fb758c2488b129"
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
version = "3.24.0"
[[deps.ColorTypes]]
deps = ["FixedPointNumbers", "Random"]
git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4"
uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
version = "0.11.4"
[[deps.ColorVectorSpace]]
deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"]
git-tree-sha1 = "a1f44953f2382ebb937d60dafbe2deea4bd23249"
uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4"
version = "0.10.0"
weakdeps = ["SpecialFunctions"]
[deps.ColorVectorSpace.extensions]
SpecialFunctionsExt = "SpecialFunctions"
[[deps.Colors]]
deps = ["ColorTypes", "FixedPointNumbers", "Reexport"]
git-tree-sha1 = "fc08e5930ee9a4e03f84bfb5211cb54e7769758a"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.12.10"
[[deps.Compat]]
deps = ["TOML", "UUIDs"]
git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "4.14.0"
weakdeps = ["Dates", "LinearAlgebra"]
[deps.Compat.extensions]
CompatLinearAlgebraExt = "LinearAlgebra"
[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.1.0+0"
[[deps.CompositionsBase]]
git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad"
uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b"
version = "0.1.2"
[deps.CompositionsBase.extensions]
CompositionsBaseInverseFunctionsExt = "InverseFunctions"
[deps.CompositionsBase.weakdeps]
InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112"
[[deps.ConcurrentUtilities]]
deps = ["Serialization", "Sockets"]
git-tree-sha1 = "9c4708e3ed2b799e6124b5673a712dda0b596a9b"
uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb"
version = "2.3.1"
[[deps.ConstructionBase]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9"
uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
version = "1.5.4"
[deps.ConstructionBase.extensions]
ConstructionBaseIntervalSetsExt = "IntervalSets"
ConstructionBaseStaticArraysExt = "StaticArrays"
[deps.ConstructionBase.weakdeps]
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
[[deps.ContextVariablesX]]
deps = ["Compat", "Logging", "UUIDs"]
git-tree-sha1 = "25cc3803f1030ab855e383129dcd3dc294e322cc"
uuid = "6add18c4-b38d-439d-96f6-d6bc489c04c5"
version = "0.1.3"
[[deps.Contour]]
git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781"
uuid = "d38c429a-6771-53c6-b99e-75d170b6e991"
version = "0.6.2"
[[deps.DataAPI]]
git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.16.0"
[[deps.DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "1fb174f0d48fe7d142e1109a10636bc1d14f5ac2"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.18.17"
[[deps.DataValueInterfaces]]
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464"
version = "1.0.0"
[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
[[deps.DefineSingletons]]
git-tree-sha1 = "0fba8b706d0178b4dc7fd44a96a92382c9065c2c"
uuid = "244e2a9f-e319-4986-a169-4d1fe445cd52"
version = "0.1.2"
[[deps.DelimitedFiles]]
deps = ["Mmap"]
git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae"
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"
version = "1.9.1"
[[deps.Distances]]
deps = ["LinearAlgebra", "Statistics", "StatsAPI"]
git-tree-sha1 = "66c4c81f259586e8f002eacebc177e1fb06363b0"
uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
version = "0.10.11"
weakdeps = ["ChainRulesCore", "SparseArrays"]
[deps.Distances.extensions]
DistancesChainRulesCoreExt = "ChainRulesCore"
DistancesSparseArraysExt = "SparseArrays"
[[deps.Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
[[deps.DocStringExtensions]]
deps = ["LibGit2"]
git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.9.3"
[[deps.Downloads]]
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
version = "1.6.0"
[[deps.EpollShim_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "8e9441ee83492030ace98f9789a654a6d0b1f643"
uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43"
version = "0.0.20230411+0"
[[deps.ExceptionUnwrapping]]
deps = ["Test"]
git-tree-sha1 = "dcb08a0d93ec0b1cdc4af184b26b591e9695423a"
uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4"
version = "0.1.10"
[[deps.Expat_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c"
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
version = "2.5.0+0"
[[deps.FFMPEG]]
deps = ["FFMPEG_jll"]
git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8"
uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
version = "0.4.1"
[[deps.FFMPEG_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "74faea50c1d007c85837327f6775bea60b5492dd"
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
version = "4.4.2+2"
[[deps.FFTW]]
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
git-tree-sha1 = "4820348781ae578893311153d69049a93d05f39d"
uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
version = "1.8.0"
[[deps.FFTW_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea"
uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a"
version = "3.3.10+0"
[[deps.FLoops]]
deps = ["BangBang", "Compat", "FLoopsBase", "InitialValues", "JuliaVariables", "MLStyle", "Serialization", "Setfield", "Transducers"]
git-tree-sha1 = "ffb97765602e3cbe59a0589d237bf07f245a8576"
uuid = "cc61a311-1640-44b5-9fba-1b764f453329"
version = "0.2.1"
[[deps.FLoopsBase]]
deps = ["ContextVariablesX"]
git-tree-sha1 = "656f7a6859be8673bf1f35da5670246b923964f7"
uuid = "b9860ae5-e623-471e-878b-f6a53c775ea6"
version = "0.1.1"
[[deps.FileIO]]
deps = ["Pkg", "Requires", "UUIDs"]
git-tree-sha1 = "c5c28c245101bd59154f649e19b038d15901b5dc"
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
version = "1.16.2"
[[deps.FileWatching]]
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
[[deps.FixedPointNumbers]]
deps = ["Statistics"]
git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc"
uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
version = "0.8.4"
[[deps.Fontconfig_jll]]
deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03"
uuid = "a3f928ae-7b40-5064-980b-68af3947d34b"
version = "2.13.93+0"
[[deps.Format]]
git-tree-sha1 = "f3cf88025f6d03c194d73f5d13fee9004a108329"
uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8"
version = "1.3.6"
[[deps.FourierTools]]
deps = ["ChainRulesCore", "FFTW", "IndexFunArrays", "LinearAlgebra", "NDTools", "NFFT", "PaddedViews", "Reexport", "ShiftedArrays"]
git-tree-sha1 = "8967a9d259ab1c50e3b3abc6b77d3e3d829d2e6d"
uuid = "b18b359b-aebc-45ac-a139-9c0ccbb2871e"
version = "0.4.2"
[[deps.FreeType2_jll]]