NOTE: This code hasn't been updated in a while. If you're searching a more up-to-date version (with GUI functionalities) of it check out SLM Controller
Implementation of Gerchberg-Saxton algorithm for generating a SLM phase pattern from a target intensity image. The code is meant for a Hamamatsu LCOS-SLM model X13138-5
The various files have the following purposes:
- GS.py : Gerchberg–Saxton algorithm. Generates a phase hologram in a range [0,255] corresponding to a [0,2pi] phase. In the SLM plane the assumption is that a the incident amplitude has the shape of a Gaussian beam.
Phase pattern evolution for GS algorithm | Errors and reconstructed image for the GS algorithm (40 iterations) |
---|---|
- GSW.py : Weighted Gerchberg–Saxton algorithm. Improvement of the GS algorithm to obtain better hologram uniformity. Based on [1]
Errors and reconstructed image for the GSW algorithm (40 iterations)
- Fresnel_gen.py : Generates a Fresnel lens pattern for the specified focus.
- Blazed_grating_gen.py : Generates a blazed grating pattern for shifting the hologram from the zero order spot.
[1] Roberto Di Leonardo, Francesca Ianni, and Giancarlo Ruocco, "Computer generation of optimal holograms for optical trap arrays," Opt. Express 15, 1913-1922 (2007)