slmsuite.holography.analysis.image_reduce_wraps#

image_reduce_wraps(phase_image, mask=None, steps=10, plot=False)[source]#

Reduce the number of phase wraps in the image by adding a global offset.

Parameters:
  • phase_image (np.ndarray) – The phase image to be offset.

  • mask (np.ndarray OR None) – If provided, the mask will weight the significance of the phase wraps. This can be the amplitude image, such that fewer wraps appear where there is light.

  • steps (int) – The number of steps to try for the phase offset.

  • plot (bool) – Whether to enable debug plots.

Returns:

A phase image with the offset applied.

Return type:

np.ndarray