I'm trying to build some synthethic diverging-beam holograms and to back propagate them using the ps_propagate function, but I'm obtaining incorrect results.
I'm assuming that the physical problem that the ps_propagate function is addressing is the one described in the following picture, where a point source located at position (Sx, Sy, Sz) generates a spherical wave with wavelength $\lambda$ . I'm considering a point scatterer located at (Px,Py,Pz) that is illuminated by the source radiation, producing a second spherical wave with the same wavelength. The origin of the spatial reference system is located at the center of the screen. Constructive or destructive interference occurs at the screen depending on the relative phase $\frac{2 \pi} { \lambda}*(D-d)$ of the two spherical waves at the screen location,
The interference pattern on the screen defines the hologram that I would like to back propagate using the ps_propagate function.
Below is my code:
import numpy as np
import holopy as hp
import matplotlib.pyplot as plt
%matplotlib inline
L = 6
Px, Py, Pz = 0, 0, 2 #scatterer position
Sx, Sy, Sz = 0, 0, L #point source position
W = 2 #screen size
Nx = 128 #number of pixel on the screen
dx = L/Nx #pixel size
wl = dx/0.5 #wavelength
x_bins = np.arange(-(Nx/2)*dx, (Nx/2)*dx, dx)
holo = np.zeros((Nx, Nx),dtype=float) #initialize the hologram
for i, x0 in enumerate(x_bins):
for j, y0 in enumerate(x_bins):
d = np.sqrt((Px-x0)**2 + (Py-y0)**2 + (Pz-0)**2) #distance from scatterer to point (x0, y0) on the screen
D = np.sqrt((Sx-x0)**2 + (Sy-y0)**2 + (Sz-0)**2) #distance from point source to point (x0, y0) on the screen
holo[i,j] = np.cos(2*np.pi/wl * (D-d)) #phase difference between point source and scatterer spherical waves
plt.matshow(holo, cmap = "gray")
holo = hp.core.metadata.data_grid(holo, spacing=dx, medium_index=1, illum_wavelen=wl)
Below the interefrence pattern of the two waves:
However, when I backpropagate the hologram using the ps_propagate function, I find that the backpropagation focuses at z = 7.0 instead than at z= 2.0 as i expected.
Dear all,
I'm trying to build some synthethic diverging-beam holograms and to back propagate them using the ps_propagate function, but I'm obtaining incorrect results. I'm assuming that the physical problem that the ps_propagate function is addressing is the one described in the following picture, where a point source located at position (Sx, Sy, Sz) generates a spherical wave with wavelength $\lambda$ . I'm considering a point scatterer located at (Px,Py,Pz) that is illuminated by the source radiation, producing a second spherical wave with the same wavelength. The origin of the spatial reference system is located at the center of the screen. Constructive or destructive interference occurs at the screen depending on the relative phase $\frac{2 \pi} { \lambda}*(D-d)$ of the two spherical waves at the screen location,
The interference pattern on the screen defines the hologram that I would like to back propagate using the ps_propagate function.
Below is my code:
Below the interefrence pattern of the two waves:
However, when I backpropagate the hologram using the ps_propagate function, I find that the backpropagation focuses at z = 7.0 instead than at z= 2.0 as i expected.
What is wrong with my interpretation of the ps_propagate function behaviour?