mmazzanti / SLM_phase_pattern

A python code for generating SLM phase patterns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stand With Ukraine

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

SLM Phase Pattern generator

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)

About

A python code for generating SLM phase patterns


Languages

Language:Python 100.0%