slmsuite.holography.toolbox

Helper functions for manipulating phase patterns.

Functions

convert_blaze_radius

Helper function for scalar unit conversions.

convert_blaze_vector

Helper function for vector unit conversions.

fit_3pt

Fits three points to an affine transformation.

format_2vectors

Validates that an array of 2D vectors is a numpy.ndarray of shape (2, N).

imprint

Imprints a region (defined by window) of a matrix with a function.

lloyds_algorithm

Implements Lloyd's Algorithm on a set of vectors using the helper function voronoi_windows().

lloyds_points

Implements Lloyd's Algorithm without seed vectors; instead, autogenerates the seed vectors randomly.

pad

Helper function to pad data with zeros.

print_blaze_conversions

Helper function to understand unit conversions.

shift_grid

Returns a copy of a coordinate basis grid with a given shift and transformation.

smallest_distance

Returns the smallest distance between pairs of points under a given metric.

unpad

Helper function to unpad data.

voronoi_windows

Returns boolean array windows corresponding to the Voronoi cells for a set of vectors.

window_slice

Get the slices that describe the window's view into the larger array.

window_square

Find a square that covers the active region of window.

slmsuite.holography.toolbox.phase

Repository of common analytic phase patterns.