From 5ae2b91ddda5583c8a24a28eb136ee08585a7125 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Fri, 16 May 2014 16:09:53 -0400 Subject: addition of exact diffraction calculation --- diffracted_image_at_target.m | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 diffracted_image_at_target.m (limited to 'diffracted_image_at_target.m') diff --git a/diffracted_image_at_target.m b/diffracted_image_at_target.m new file mode 100644 index 0000000..afc92fd --- /dev/null +++ b/diffracted_image_at_target.m @@ -0,0 +1,20 @@ +function img_target = diffracted_image_at_target(img_source, xpos_s, ypos_s, image_target, xpos_t, ypos_t, z_t, lambda) + +[Ny,Nx]=size(image_target); + +xim_t=linspace(xpos_t(1), xpos_t(end), Nx); +yim_t=linspace(ypos_t(1), ypos_t(end), Ny); + +img_target=zeros(Ny, Nx); + +for i=1:Nx + for k=1:Ny + intensity = beam_intensity_at_point_from_image(xim_t(i), yim_t(k), z_t, img_source, xpos_s, ypos_s, lambda); + img_target(k,i) = intensity; + end +end + + + + + -- cgit v1.2.3