slmsuite.holography.toolbox.phase.quadrants#

quadrants(grid, radius=0.001, center=(0, 0))[source]#

Returns a quadrant-based alignment mask similar to bahtinov(). In this case, each quadrant is filled with a blazed grating pointing in the direction of the quadrant. When the source is centered on the SLM, the four resulting spots will have the same intensity (to first order). The position of the spots on the camera can align the SLM to the optical axis of the system.

Parameters:
  • grid (Union[Tuple[ndarray, ndarray], object]) – \(\vec{x}\). 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.

  • radius (float) – Radius of the diffraction pattern in normalized \(\frac{k_x}{k}\) units. See convert_radius(). Defaults to a milliradian.

  • center (Tuple[float, float]) – Center of the diffraction pattern in normalized \(\frac{k_x}{k}\) units. Defaults to the origin.

Return type:

ndarray

Returns:

The phase for this function.