slmsuite.holography.toolbox.phase.lens#

lens(grid, f=(inf, inf))[source]#

Returns a simple thin parabolic lens.

When the focal length \(f\) is isotropic,

\[\phi(\vec{x}) = \frac{\pi}{f}|\vec{x}|^2\]

Otherwise \(\vec{\,f\,}\) represents an elliptical lens,

\[\phi(x, y) = \pi \left[\frac{x^2}{f_x} + \frac{y^2}{f_y} \right]\]
Parameters:
  • grid ((array_like, array_like) OR SLM) – Meshgrids of normalized \(\frac{x}{\lambda}\) coordinates corresponding to SLM pixels, in (x_grid, y_grid) form. These are precalculated and stored in any SLM, so such a class can be passed instead of the grids directly.

  • f (float OR (float, float)) – Focus in normalized \(\frac{x}{\lambda}\) units. Defaults to infinity (no lens). Scalars are interpreted as a non-cylindrical isotropic lens. See convert_vector() to convert depths in focal power units (inverse of \(f\)) into other units and back.

Returns:

The phase for this function.

Return type:

numpy.ndarray