slmsuite.holography.toolbox.phase.sinusoid#

sinusoid(grid, vector=(0, 0), shift=0, a=3.141592653589793, b=0)[source]#

Returns a simple holographic grating, a sinusoidal grating, toward a given vector in \(k\)-space.

\[\phi(\vec{x}) = \frac{a-b}{2} [1 + \cos(2\pi \cdot \vec{k} \cdot \vec{x} + s)] + b\]

Important

Unlike a blazed grating blaze(), power will efficiently be deflected toward the mirror -1st order at \(-\vec{k}\) in addition to the 1st order, by symmetry.

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.

  • vector (Union[Tuple[float, float], Tuple[int, int]]) – \(\vec{k}\). Blaze vector in normalized \(\frac{k_x}{k}\) units. See convert_vector().

  • shift (float) – Radians to laterally shift the period of the grating by.

  • a (float) – Value at one extreme of the sinusoid. Ignoring crosstalk, the 0th order will be minimized when |a-b| is equal to \(\pi\).

  • b (float) – Value at the other extreme of the sinusoid. Defaults to zero, in which case a is the amplitude.

Returns:

The phase for this function.