summaryrefslogtreecommitdiff
path: root/diffracted_image_at_target.m
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2014-05-16 16:09:53 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2014-05-16 16:09:53 -0400
commit5ae2b91ddda5583c8a24a28eb136ee08585a7125 (patch)
tree7a2eaeed3f2d246e0cc2c3feaa8a94c2f96be914 /diffracted_image_at_target.m
parent24b48105c1c4ed1dcd3a0de68df91d7003b2789c (diff)
downloadbeam_reshape-5ae2b91ddda5583c8a24a28eb136ee08585a7125.tar.gz
beam_reshape-5ae2b91ddda5583c8a24a28eb136ee08585a7125.zip
addition of exact diffraction calculation
Diffstat (limited to 'diffracted_image_at_target.m')
-rw-r--r--diffracted_image_at_target.m20
1 files changed, 20 insertions, 0 deletions
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
+
+
+
+
+