Comments (1)
Hello,
I think the best approach for you would be to propagate the beam into the focus of the KB by using LensFarField and then use Forvard to propagate back and forth around the focus. The result of LensFarField is a Field in the focal plane of a lens. The LightPipes LensFarField is not yet deployed, but you can input this function into your script and use it (taken from 0e83735). There is a question about correct amplitude of the field but that doesn't have to concern you since you normalize the beams. The dimension of grid scaling should be correct.:
def TestLensFarField(Fin, f):
"""
Use a direct FFT approach to calculate the far field of the input field.
Given the focal length f, the correct scaling is applied and the
output field will have it's values for size and dx correctly set.
Also applies correct prefactors to field as calculated from Fresnel
approximation and lens as square phase.
Parameters
----------
f : double
Focal length in meters/ global units
Fin : lp.Field
The input field.
Returns
-------
The output field.
"""
dx = Fin.dx
lam = Fin.lam
k = 2*_np.pi/lam
L_prime = lam * f / dx
Fout = PipFFT(Fin, index=1)
Fout.siz = L_prime
Fout.field *= Fin.dx**2 # hope this is correct, should be as long as numpy normalization = backward (none for forward)
Fout.field *= 1/(1j*lam*f) * _np.exp(1j*k*f)
Fout.field *= np.exp(1j*k/(2*f)*(Fout.mgrid_Rsquared))
Fout._IsGauss=False
return Fout
Getting a nice image in the Lens far field requires playing with number of grid points and grid size (bigger beam in the image at the start => smaller beam in the image in the lens far field)
As to the propagation from KB somewhere closer to focus with LensForvard/LensFresnel. The thing is that the real dimension [m] of your grid is getting smaller while the image is not changing that much. I think that this is your problem for the steps vs. x[mm] plots, where you don't see the focusing. You probably plot steps vs. pixels, but the scaling of pixels to mm changes and you don't reflect this in your plots and can't see the focusing.
I gained this result of beam dimension against propagation distance (it is distance from the focus at 3m from the KB, so 0 um is at 3 m from KB, -1000um is at 2.999m from KB). Green dotted lines show positions where propagation for (something like) LensForvard was changed to propagation around focus by LensFarField and Forvard, red dotted line is change from LensFarField to "LensForvard".
I something like LensForvard, but not quite that, so I can't tell you the parameters to set, however getting a nice image should requite playing with f2, grid_size, number of grid points.
And lastly to the physics. I have some experience with X-ray beams focused by KB optics and the beam in the focus is quite different from Gaussian. There is always astigmatism from KB, the beam itself has wavefront distortions that show in the close to the focal plane. You can use this simulation as a best case scenario but you should count with having a different beam in the focus. A reconstruction of a beam profile in the focus can be found for example here: https://doi.org/10.1364/OE.21.026363.
And if your experiment is highly dependent of the intensity distribution in the focus, you should consider measuring the real intensity distribution there, for example by the method in the article or by different methods.
from lightpipes.
Related Issues (20)
- Warning when paraxiality is violated HOT 2
- Shift with direct integration Forward
- Diffraction From Thin Wire HOT 4
- Step by Step Propagation With a Short Focal Length Lens HOT 3
- LightPipes on an iPad
- LPtest() fails on some systems while installation is correct HOT 1
- Intensity plot gets cut up when attempting to propagate finite airy beam HOT 9
- Cite lightpipes in a paper HOT 2
- lens Following Field Produced by Forward Function
- Airy Beam HOT 6
- LG doughnut mode HOT 4
- Microwave frequencies HOT 3
- A doc example of D4sigma seems to call Centroid instead of D4sigma HOT 1
- LensFarfield in lenses.py but not in __init__.py and documentation HOT 2
- Michelson interferometer with the Zernike aberration HOT 4
- Bessel Beam Simulation from an annulus of light HOT 4
- Calculate the power( ratio) in the bucket and times the diffraction limit
- Strehl ratio formula
- Intensity distribution of Gaussian beam Propagated in space through a Lens at twice the focal Length HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightpipes.