Open concord647 opened 3 years ago
Direct integration is very time consuming. You should use the trick with spherical coordinates to simulate the Airy disk in the focus of a lens. See the manual: https://opticspy.github.io/lightpipes/manual.html#spherical-coordinates
Hi Fred,
thank you very much for your reply - and for providing such a neat package of course.
Yes, it is indeed very time consuming. However, I need to propagate the field not only to the focus but also through the focus to the 2f-Plane, as in a 4f-Configuration. I couldn't figure out a way to do this using the trick with sperical coordinates. Is it possible?
Anyways, I wouldn't mind the long computation time of the direct integration method, if the results are correct. However I am still wondering about the resulting airy disc in the focal plane as shown in my original post. I adapted the source code of the spherical coordinates-example to match the physical parameters of the code shown above and this is the result:
in direct comparison to the result obtained with direct integration (as shown earlier):
Do you see a reason why the first minimum shouldn't go down to zero?
Hi Fred, I also meet the problem to get the Airy side-lobs as theory. In the code of LensFresnel_Convert_f10cm.py, you use as F2=Lens(f1,0,0,F); F2=LensFresnel(f2,f,F2); but commands are defined Lens(Fin, f, x_shift=0.0, y_shift=0.0) and LensFresnel(Fin, f, z). Are they OK in both ways?
Thanks a lot.
Dear @Jackzeng999,
your question is regarding the argument order, correct? We changed this in LightPipes 2.0 so that the Field is always first (new way). This allows many optional arguments with default values, since you can just leave them out. Up to version 1.2, the field was always last, so optional arguments was tricky. All functions (expect new functions introduced in 2.0 or later) were made backward compatible and detect if Field is first or last. The example still uses the old style.
Regarding the f1 and f2 parameter, this should be clear from the manual how both lenses (a phase only lens and one geometrical spherical coord lens) combined give the focal strength f
.
@concord647 and @Jackzeng999 concerning the non-existent first minimum: This is indeed strange and I have no immediate explanation for it. This is only a guess and might be completely wrong, but could this be the evidence of spherical abberrations?
Lens
command to apply a quadratic phase and e.g. Fresnel
command to calculate the (quadratically approximated) propagation, this cancels out and yields a nice focus with flat wavefront.Lens
command) but a non-approximated propagator (maybe Forward
I have to check whether it is also approximated) will show spherical abberrationsFresnel
will also yield slightly wrong results.Forward
can be improved by using higher order Zernikes or manually specifying a more accurate phase. Maybe someone has some theoretical insight or source for this?@concord647 concerning the spatial filter: A PhD colleague of mine tried to do the same and successfully implemented the downscaling, filtering and upscaling using the geometrical spherical coords command. Think of the command not as a lens, but just as a geometrical transform. Imagine you want to propagate from the focal plane (size=100um) to a distance of 99mm and a size of 10mm. Apply first a Lens(F, f=1*mm)
and then a LensFresnel(F, f=-1*mm, z=99*mm)
and then Convert
to get to the output plane. The first Lens
command compensates the phase that will be added by LensFresnel
since we just want to use it's geometric propagation, not it's focussing/defocussing effect. Sketch it out, hopefully it will become clear (intercept theorem). I can elaborate if the question is still relevant.
Best, Lenny
Hi!
I am trying to simulate a spatial filter with LightPipes with an input beam size of 10 mm and a pinhole size of around 10 μm, thus the only way to account for vastly different sampling demands seems to be direct integration of the fresnel integral.
I implemented this with LightPipes, however I was not able to produce a "clean" airy disc in the focal plane for the ideal situation of an monochromatic plane wave (const. Amplitude) over a circular aperture of 10 mm. The focal length of the lens is 150 mm, however the phase behind the lens seems to be sampled accuratly enough (see figures).
From the figures it seems to me as we are slightly "out of focus" in the focal plane. The script producing these results is attached. Is this an issue of implementation in LightPipes, an expected result or am I doing something wrong?
Also this is of course very heavy on computation. I was wondering if there is any way to "back-propagate" from the focal plane (after applying a pinhole filter) to a collimated beam using the Spherical Coordinates - Method (6.7 in the manual)?
Absolute field in focus:![image](https://user-images.githubusercontent.com/63842120/97406744-003fbd80-18fa-11eb-8510-5e313465e6a2.png)
1D central linecut in focus:![image](https://user-images.githubusercontent.com/63842120/97406856-236a6d00-18fa-11eb-984d-fbe36e39bb63.png)
Unwrapped phase in focus (central linecut):![image](https://user-images.githubusercontent.com/63842120/97406935-3d0bb480-18fa-11eb-8423-3cb891b22265.png)
Unwrapped phase directly behind lens (central linecut):![image](https://user-images.githubusercontent.com/63842120/97407030-63315480-18fa-11eb-9031-c54a1785912f.png)
Field behind Aperture:![image](https://user-images.githubusercontent.com/63842120/97408802-ed7ab800-18fc-11eb-8021-ff7654bc9ab9.png)
Code: