summaryrefslogtreecommitdiff
path: root/demo_diffraction_on_a_disk.m
diff options
context:
space:
mode:
Diffstat (limited to 'demo_diffraction_on_a_disk.m')
-rw-r--r--demo_diffraction_on_a_disk.m43
1 files changed, 43 insertions, 0 deletions
diff --git a/demo_diffraction_on_a_disk.m b/demo_diffraction_on_a_disk.m
new file mode 100644
index 0000000..49c2aff
--- /dev/null
+++ b/demo_diffraction_on_a_disk.m
@@ -0,0 +1,43 @@
+% light wavelength
+lambda=795e-9; % Rb D1 line
+
+% set up mask (source image)
+Nx_s=301;
+Ny_s=301;
+img_source=zeros(Ny_s,Nx_s);
+
+src_size = 1.0*12.5e-3;
+xpos_s=linspace( -src_size, src_size, Nx_s);
+ypos_s=linspace( -src_size, src_size, Ny_s);
+
+[xmesh,ymesh]=meshgrid(xpos_s,ypos_s);
+w=0.0014*3/2;
+R=1;
+z_before_mask=LaguerreGaussianE([0,0,q_(w,R,lambda),lambda],xmesh,ymesh,'cart');
+
+% disk mask
+mask_R = (w*0.33);
+mask = mask_transparency(xmesh,ymesh, mask_R);
+
+% resulting field after mask
+img_source= z_before_mask .* mask;
+%img_source= z_before_mask;
+
+
+% set up target image
+Nx_t=101;
+Ny_t=101;
+img_t=zeros(Ny_t,Nx_t);
+tgt_size = 2*12.5e-3;
+xpos_t=linspace( -tgt_size, tgt_size, Nx_t);
+ypos_t=linspace( -tgt_size, tgt_size, Ny_t);
+z_t=10;
+
+
+% generating image of the mask accounting the diffraction
+tic; % start timer
+img_t=diffracted_image_at_target(img_source, xpos_s, ypos_s, img_t, xpos_t, ypos_t, z_t, lambda);
+toc % show evaluation time
+
+% plot source and target images
+show_diffraction(img_source, xpos_s, ypos_s, img_t, xpos_t, ypos_t);