Comments (1)
Hello Tess,
are you referring to Fred's example in Examples/Zernike/Shack_HartmannDemo[2...3].py
?
As you can see from the plots, the examples work and create the expected abberated patterns.
What might be confusing, esp. in the first demo, is that the field at the plane of the sensor is stored in F
, while Forvard
is applied and stored as a new variable F1
and the Zernike aberration is only applied and propagated in F2
, which is never plotted. So maybe the "plot2" and "plot3" examples are more instructive.
However in all cases, the order of commands has the correct outcome:
- A large empty field is created
- A small field is created with a circular lens of the right size
- The small field is inserted in a grid in the large field
- Before propagating further, i.e. in the plane of the microlens array, the aberration is applied.
- Then the propagation to the focal plane of the microlenses (i.e. the plane of the camera) is calculated with either
Forvard
orFresnel
In the same plane, e.g. the plane of the microlens array, the order of phase/intensity modulations is physically irrelevant as they are complex multiplications. So applying the phase shift due to the microlens first or the aberration first has the same outcome. You can plot the unwrapped phase after applying the microlens pattern and Zernike aberration, but before propagation.
So much for the example code. In your use case, it sounds like you would like to use an arbitrary input field and then apply the microlens array, which probably makes more sense in everday applications. This can still be done. The quickest way I can think of is to construct the Shack-Hartmann field like the example, with an unaberrated beam. Then, you can save the intensity distribution and (wrapped) phase in two variables, and use MultPhase
and MultIntensity
on your actual field to simulate the effect of the microlens array. A final Fresnel(F, f_microlenses)
should then give you the expected distribution on the camera.
Let us know if this helps, maybe I can create an example with the method I described if you get stuck.
from lightpipes.
Related Issues (20)
- installation problems
- Add Interpol option in Fresnel and Forvard HOT 1
- 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
- interference pattern with a focused x-ray beam (spherical coordinates propagation & Steps) HOT 1
- Calculate the power( ratio) in the bucket and times the diffraction limit
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.