slmsuite.holography.toolbox.phase.lens
- lens(grid, f=(inf, inf))[source]
Returns a simple thin parabolic lens. When
f
is isotropic,\[\phi(\vec{x}) = \frac{\pi}{f}|\vec{x}|^2\]Otherwise,
\[\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 anySLM
, so such a class can be passed instead of the grids directly.f (float OR (float, float)) – Focus in normalized \(\frac{x}{\lambda}\) units. Scalars are interpreted as a non-cylindrical isotropic lens. Future: add a
convert_focal_length
method to parallelconvert_blaze_vector()
Defaults to infinity (no lens).
- Returns
The phase for this function.
- Return type
numpy.ndarray