slmsuite.holography.toolbox.phase.hermite_gaussian#

hermite_gaussian(grid, n, m, w=None)[source]#

Returns the phase farfield for a Hermite-Gaussian beam. Uses the formalism described by this paper.

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.

  • n (int) – The horizontal n and vertical m wavenumbers. n = m = 0 yields a flat phase and a Gaussian beam.

  • m (int) – The horizontal n and vertical m wavenumbers. n = m = 0 yields a flat phase and a Gaussian beam.

  • w (float) – See _determine_source_radius().

Returns:

The phase for this function.

Return type:

numpy.ndarray