slmsuite.holography.algorithms
GPU-accelerated holography algorithms.
This module is currently focused on
Gerchberg-Saxton (GS)
iterative Fourier transform phase retrieval algorithms
via the Hologram
class;
however, support for complex holography and other algorithms
(e.g. gradient descent algorithms)
is also planned. Additionally, so-called Weighted Gerchberg-Saxton (WGS) algorithms for hologram
generation with or without closed-loop camera feedback are supported, especially for
the generation of optical focus arrays,
a subset of general image formation. We also support Mixed Region Amplitude Freedom (MRAF) feedback.
Tip
This module makes use of the GPU-accelerated computing library cupy
(GitHub)
If cupy
is not supported, then numpy
is used as a fallback, though
CPU alone is significantly slower. Using cupy
is highly encouraged.
Important
slmsuite
follows the shape = (h, w)
and vector = (x, y)
formalism adopted by
the numpy
ecosystem. numpy
, scipy
, matplotlib
, etc generally follow this
formalism. The shape
and indexing of an array or image always uses the inverted (h, w)
form,
but other functions such as numpy.meshgrid(x, y)
(default), scipy.odr.Data(x, y)
, or
matplotlib.pyplot.scatter(x, y)
use the standard cartesian (x, y)
form that is more familiar
to users. This is not ideal and causes confusion, but this is the formalism generally
adopted by the community.
Important
This package uses a number of bases or coordinate spaces. Some coordinate spaces are
directly used by the user (most often the camera basis "ij"
used for feedback).
Other bases are less often used directly, but are important to how holograms are
optimized under the hood (esp. "knm"
, the coordinate space of optimization).
Basis |
Meaning |
---|---|
|
Pixel basis of the camera. Centered at |
|
Normalized (floating point) basis of the SLM’s \(k\)-space in normalized units.
Centered at |
|
Pixel basis of the SLM’s computational \(k\)-space. Centered at |
See the first tip in Hologram
to learn more about "kxy"
and "knm"
space.
Classes
Experimental holography aided by camera feedback. |
|
Phase retrieval methods applied to holography. |
|
Holography optimized for the generation of optical focal arrays. |