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. The only algorithm that has no CPU fallback is CompressedSpotHologram in a Zernike basis beyond 2D or 3D spots. Other cases can use the CPU (however slowly).

Note

Internally, algorithms is split into several hidden files to enhance clarity and reduce file length.

  • _header.py : The common imports for all the files.

  • _stats.py : Statistics and plotting common to all hologram classes.

  • _hologram.py : The core file. Contains the actual algorithms (Hologram).

  • _feedback.py : Infrastructure for image feedback (FeedbackHologram).

  • _spots.py : Infrastructure for spot-specific holography (SpotHologram, CompressedSpotHologram).

Classes

CompressedSpotHologram

Holography optimized for the generation of optical focal arrays (kernel-based).

FeedbackHologram

Experimental holography aided by camera feedback.

Hologram

Phase retrieval methods applied to holography (DFT-based).

MultiplaneHologram

Holography combining multiple objectives, potentially across planes of focus or color.

SpotHologram

Holography optimized for the generation of optical focal arrays (DFT-based).