function show_diffraction(img_source, xpos_s, ypos_s, img_target, xpos_t, ypos_t)

[Ny_s,Nx_s] = size(img_source);
[Ny_t,Nx_t] = size(img_target);

% plot mask image
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,img_source); 
colorbar; colormap('gray');
xlabel('x (m)');
ylabel('y (m)');
title('mask image');

% plot diffraction image
figure(2);
x_t=linspace(xpos_t(1), xpos_t(end), Nx_t);
y_t=linspace(ypos_t(1), ypos_t(end), Ny_t);
% I use gamma correction due to luck of the display dynamic range
gamma=1/4; % pixel brightness correction, display dependent
imagesc(x_t, y_t, (img_target).^gamma);  
colorbar; colormap('gray');
xlabel('x (m)');
ylabel('y (m)');
title('target image');

