summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demo_diffraction_on_a_disk.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/demo_diffraction_on_a_disk.m b/demo_diffraction_on_a_disk.m
index 3eb511c..13f1ebe 100644
--- a/demo_diffraction_on_a_disk.m
+++ b/demo_diffraction_on_a_disk.m
@@ -58,7 +58,10 @@ 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
-imwrite(img_t/max(img_t(:)),'diffracted_image.png')
+dstr = datestr(now,'yyyymmdd-HH:MM:SS');
+fname = strcat('diffracted_image', '_', dstr, '.png');
+img_t_intensiry = abs(img_t/max(img_t(:))).^2;
+imwrite(img_t_intensiry, fname);
% plot source and target images
show_diffraction(img_source, xpos_s, ypos_s, img_t, xpos_t, ypos_t);