lightpipes icon indicating copy to clipboard operation
lightpipes copied to clipboard

Direct Integration (Fresnel) of Circ Aperture + Lens doesn't lead to (clean) Airy?

Open concord647 opened this issue 5 years ago • 4 comments

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

1D central linecut in focus: image

Unwrapped phase in focus (central linecut): image

Unwrapped phase directly behind lens (central linecut): image

Field behind Aperture: image

Code:


from LightPipes import *

N = 1400
wvl = 532*nm
size = 10.5*mm
focal_length = 150*mm

r_aperture = 5e-3

size_fourierPlane = 50e-6
N_fourierPlane = 96

F_init = Begin(size, wvl, N)
F1 = CircAperture(F_init, r_aperture)
F2 = Lens(F1, focal_length)
F3 = Forward(F2, focal_length, size_fourierPlane, N_fourierPlane)

concord647 avatar Oct 28 '20 07:10 concord647

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

FredvanGoor avatar Oct 29 '20 10:10 FredvanGoor

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:

grafik

in direct comparison to the result obtained with direct integration (as shown earlier): grafik

Do you see a reason why the first minimum shouldn't go down to zero?

concord647 avatar Oct 30 '20 14:10 concord647

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.

Jackzeng999 avatar Jan 06 '21 13:01 Jackzeng999

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?

  • A perfect lens would lead to a spherical wavefront immediately after the lens. In paraxial approximation, the spherical phase front can be well approximated by a quadratic/parabolic phase.
  • Similarly, when approximating and simplifying the Kirchhoff diffraction integrals, the correct radial dependence is simplified to quadratic order for e.g. Fresnel approximation.
  • In conclusion, when using 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.
  • In contrast, using a quadratic phase (by Lens command) but a non-approximated propagator (maybe Forward I have to check whether it is also approximated) will show spherical abberrations
  • Likewise, a correct spherical phase but with approximated propagator like Fresnel will also yield slightly wrong results.
  • I really hope this is not complete nonsense, it's about as far as I have gone into the diffraction theory so far!
  • This would mean the result using 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

ldoyle avatar Jan 11 '21 11:01 ldoyle