Skip to content

This repository contains python functions for creating arbitrary off-axis corrected hologram patterns

License

Notifications You must be signed in to change notification settings

McMorranLab/corrected_holography

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

corrected_holography

This repository contains python functions for creating arbitrary off-axis corrected hologram patterns. It accompanies the research article:

C. W. Johnson, J. S. Pierce, R. C. Moraski, A. E. Turner, A. T. Greenberg, W. S. Parker, and B. J. McMorran, “Corrected Off-Axis Holography for Producing Arbitrary Scalar Fields,” Opt. Express, OE (Submitted 2020)

It is managed by the McMorran Lab at the University of Oregon. See licence for use and distribution permissions.

POC: Benjamin J. McMorran

Purpose

This repository is a Python implementation of the inversion of Eq. (13) as described in Section 2.3 of the article:

equation

It contains functions to search for the maps equation which contribute most to the sum on the RHS, and to numerically invert the above equation using those maps to find the functions equation and equation corresponding to a desired function equation.

Usage

corrected_holography_example.py contains a general working example of how to use the functions defined in corrected_holography.py. It is written as a notebook, and can be run using Hydrogen, or imported as a Jupyter notebook. Following a clone of this repository, it can be run immediately, with the following Python module dependencies: copy, gc, heapq, itertools, matplotlib, numpy, os, scipy, time.

In addition to illustrating the process described in the paper, this repository is intended to be a utility for those hoping to generate off-axis holograms for wavefront shaping. Thus, a bare-bones template ch_template.py is included that can be edited in a text editor but run from the command line. It has the extra dependency argparse.

In general, the user will need to specify the following variables in order to generate an off-axis hologram:

Symbol Variable name in ch_template.py Description
equation eta Complex parameter the attenuation and phase shift per unit length of material.
equation h The groove depth.
equation p Search limit parameter equation.
equation q Search limit parameter equation.
equation ord Diffraction order on which to imprint the desired function.
equation beam_func A python function which defines the desired transverse profile.
limit_search Boolean to limit the search to 1 non-zero value in eqaution. Use only for visualization.
num The output hologram will have resolution numxnum.
size The diameter in equation of the grating.
pitch The pitch in equation of the grating.
f_comps Required only for arbitrary. A python function which defines the Fourier components of the groove profile.

ch_template.py usage

ch_template.py is a command-line interface for corrected_holography.py. It will save a .npy file containing the computed hologram, as well as a .npy file containing the computed back Fourier plane, if specified.

The user must specify:

  1. The desired beam profile within ch_template.py.
  2. The desired groove profile (sinusoidal, binary, blazed, or arbitrary) via command line.
    • If arbitrary, the user must specify a groove profile within ch_template.py

All other grating parameters can be specified via the command line, and default to those listed in the article.

Example

To create a binary hologram that creates a Laguerre-Gauss mode LG23 in the first diffracted order, with pitch 4um, the user would first define the LG mode in ch_template.py.

...
### Desired beam, desired groove profile
beam_func = LG23(x,y)

def LG23(x, y): ### user input
     ...
...

then run from the command line

python ch_template.py -fpath filepath -fname filename -pitch 4 -bfp binary

-bfp tells the program to compute and save the back fourier plane of the computed hologram. Also note that corrected_holography.py contains definitions of the Laguerre-Gauss modes for convenience.

The user can also specify an arbitrary groove profile by defining f_comps:

### Desired beam, desired groove profile
beam_func = ### user input - beam profile
f_comps = ### user input - groove profile's Fourier components

and would then instead run

python ch_template.py -fpath filepath -fname filename -pitch 4 -bfp arbitrary

About

This repository contains python functions for creating arbitrary off-axis corrected hologram patterns

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages