Open yp000925 opened 3 years ago
The vertical and horizontal stripes are caused by 'numerical reflections' from the grid borders and can be removed by making the fields equal to zero near those borders. This is important when using the Fresnel command. You can use for example the SuperGaussAperture command to do this. In the following example this has been demonstrated. Comment the SuperGaussAperture command and see the effect on the Fresnel propagation. Sometimes it is better to use the Fresnel command instead of the Forvard command, see the manual for some explanation.
from LightPipes import *
import matplotlib.pyplot as plt
wavelength = 633*nm
N = 1000
size = 2000*um
particle = 50*um
z1=3*cm
F = Begin(size,wavelength,N)
F=SuperGaussAperture(F,size/3,n=10)
F_obj1 = CircScreen(F,particle)
F_obj1Fo = Forvard(F_obj1,z1)
F_obj1Fr = Fresnel(F_obj1,z1)
fig = plt.figure()
ax1 = fig.add_subplot(221)
ax2 = fig.add_subplot(222)
ax1.imshow(Intensity(F_obj1Fo,2), cmap='gray'); ax1.axis('off');ax1.set_title('Forvard')
ax2.imshow(Intensity(F_obj1Fr,2), cmap='gray'); ax2.axis('off');ax2.set_title('Fresnel')
plt.show()
Hi
Thanks for your great working in building this light field simulation library!
I am using this to synthesise some in-line holograms from the particle field based on the Fresnel Diffraction theory. While there are some nonphysical noise occurs (Probably come from the aliasing effect?) Is there any way to handle that?
And with the seem parameter setting , the resulted holograms look quite different from using Forvard() (Fig Set.1) and Fresnel()(Fig Set.2). Do you have some ideas about how to tackle this issue? It looks like the Fresnel()has more vertical and horizontal stripes contained.
![Image2](https://user-images.githubusercontent.com/45595057/100951401-719e0c00-3549-11eb-8e86-d53b3748e5c1.png)
Thanks
The code i used is