Comments (4)
Thanks for finding this bug! Fixed in a977cfc.
- To your first question, I usually optimize the hologram using WGS with
"computational_spot"
for a few (~10) iterations such that the hologram is converged enough along the desired$k$ -vectors. Then Irefine_offsets()
and repeat the process for a few (usually ~3) times. This is a very fast process because"computational_spot"
is all internal optimization and doesn't need to wait for the hardware to respond. Then after I'm happy with the refinement, I do"experimental_spot"
or"external_spot"
to hone the uniformity at the corrected positions. If you want to minimize the number of calls to optimize, the suggested way to do this internally would be to feed in a callback like:
def refine_callback(hologram):
if hologram.iter % 10 == 9:
hologram.refine_offset()
hologram.optimize(..., callback=refine_callback)
-
Your second question is on-point. @cpanuski will be interested. We've had discussions for a while regarding using much more of the camera data (currently, the
wavefront_calibration()
only uses one pixel, which is honestly really bad). I think a concern was with edge-cases where you're imaging on top of some feature which distorts the pattern, and/or issues with the alignment of the target and reference beams on top of each other. That said, I think this is definitely worth implementing. We even had code for fitting a 2D sinc at one point but I don't know where this went to. I'm adding a TODO list and the enhancement label to this Issue because I think implementing this suggestion will makewavefront_calibration()
much better and faster. -
Reimplement 2D sinc with a sinusoidal phase function.
-
Use this inside
wavefront_calibration()
as an option. Maybe trigger this option viaphase_steps=None
or something to minimize new variables and fit the theme of the package in repurposing variables withNone
. -
Debug.
-
Figure out what to do with superpixels near the reference superpixel.
from slmsuite.
Okay, did a first pass in f0e172b. Maybe will debug this week on hardware.
One major issue that I'm recalling: superpixels near the reference superpixel will not have many fringes visible on the 2D sinc (depending on parameters, etc). This is potentially breaking for these superpixels. Maybe can have a fallback or clever movement of the reference superpixel. This is not an issue if you maintain the sinc2D center at the interference point. Thus, you look for the shift in the blob due to the new sine term.
from slmsuite.
Thanks for the fast reply, and super efficient implementation. I can also try the new function on my setup sometime this week. One small thing is that in the wavefront calibration function, a background and a reference mode image are taken for every super-pixels, which I assume might be possible to be moved out of the loop. Also the background image doesn't seem to be used anywhere in the later code. Maybe the intention was to substract that from the other measurement?
from slmsuite.
Hi KaizhaoWang
Thanks again for this feedback!
The reference mode image is important for systems with unstable laser power. Without consistent normalization, one gets bad results for the amplitude calibration. Maybe we could add a flag for this, but I think it's important to keep on no matter what because the user may not anticipate instability.
The background image is a good point, esp. as it isn't used. I think the intent for that was to handle systems with bad scatter/etc, but you're right that it isn't used. This should be optional.
- Add a flag to enable taking the background and implementing background processing.
from slmsuite.
Related Issues (20)
- Unify Erroring
- wavefront_calibrate() HOT 1
- 3D Spots
- Stored SLM `phase` includes `phase_correction`
- Wavefront calibration link HOT 1
- slmsuite.holography.toolbox.smallest_distance unexpected behavior HOT 1
- Clean up true 2D support for cameras/SLMs with non-square pixels. HOT 1
- DataRay Camera support HOT 1
- `take` does not work properly for stacks of images. HOT 1
- `averaging` flag for cameras HOT 1
- `Filesystem` camera
- Cameras update
- AL Loop for Weights HOT 1
- Wavefront calibration over a field of view HOT 3
- gradient-based optimization for phase and amplitude objectives
- Unusual behavior with `take` using even pixel number.
- Some AlliedVision cameras don't have binning attributes.
- Some corrections for MRAF in the package
- Allied Vision Vimba-X Support HOT 2
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 slmsuite.