From 240d1de52762c64e5dc6c981780b2320bfd191e4 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Mon, 19 May 2014 17:14:53 -0400 Subject: added field calculation for diffracted image --- show_diffraction.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'show_diffraction.m') diff --git a/show_diffraction.m b/show_diffraction.m index 84a44d0..3421b0f 100644 --- a/show_diffraction.m +++ b/show_diffraction.m @@ -7,7 +7,7 @@ function show_diffraction(img_source, xpos_s, ypos_s, img_target, xpos_t, ypos_t figure(1); x_s=linspace(xpos_s(1), xpos_s(end), Nx_s); y_s=linspace(ypos_s(1), ypos_s(end), Ny_s); -imagesc(x_s,y_s, abs(img_source)); +imagesc(x_s,y_s, abs(img_source).^2); colorbar; colormap('gray'); xlabel('x (m)'); ylabel('y (m)'); @@ -21,7 +21,7 @@ y_t=linspace(ypos_t(1), ypos_t(end), Ny_t); % pixel brightness correction, display dependent %gamma=1/4; gamma=1; -imagesc(x_t, y_t, (abs(img_target)).^(gamma)); +imagesc(x_t, y_t, (abs(img_target).^2).^(gamma)); colorbar; colormap('gray'); xlabel('x (m)'); ylabel('y (m)'); -- cgit v1.2.3