slmsuite.holography.analysis#

Helper functions for processing images.

Submodules

files

Utilities for interfacing with files.

fitfunctions

Common fit functions.

Functions

blob_array_detect

Detect an array of spots and return the orientation as an affine transformation.

blob_detect

Detect blobs in an image.

fit_affine

For two sets of ordered points with equal length, find the best-fit affine transformation that transforms from the first basis to the second.

get_orientation_transformation

Compile a transformation lambda from simple rotates and flips.

image_areas

Given the output of image_variances(), return a measure of spot area for each moment triplet.

image_blaze_remove

Backwards compatible alias for image_remove_blaze().

image_centroids

Alias for image_positions()

image_ellipticity

Given the output of image_variances(), return a measure of spot ellipticity for each moment triplet.

image_ellipticity_angle

Given the output of image_variances(), return the rotation angle of the scaled basis for each moment triplet.

image_fit

Fit each image in a stack of images to a 2D function.

image_moment

Computes the given moment \(M_{m_xm_y}\) for a stack of images.

image_normalization

Computes the zeroth order moments, equivalent to spot mass or normalization, for a stack of images.

image_normalize

Normalizes of a stack of images via the the zeroth order moments such that each image sums to one.

image_positions

Computes the two first order moments, equivalent to spot position \(\left<x\right>\) relative to image center, for a stack of images.

image_reduce_wraps

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

image_relative_strehl

Computes a metric proportional to the Strehl ratio of a stack of images.

image_remove_blaze

Remove a global blaze from a phase image.

image_remove_field

Zeros the field of a stack of images such that moment calculations will succeed.

image_remove_vortices

Find and then remove all the phase vortices in a phase image.

image_std

Near-alias of image_variances().

image_variances

Computes the three second order central moments, equivalent to variance, for a stack of images.

image_vortices

Find the coordinates of phase vortices inside a phase image by computing the winding number directly.

image_vortices_coordinates

Find the coordinates of phase vortices inside a phase image by computing the winding number directly.

image_zernike_fit

Fits sets of Zernike polynomials to a stack of phase_images, up to a desired order.

take

Crop integration regions around an array of vectors, yielding an array of images.

take_plot

Plots non-integrated results of take() in a square array of subplots.

take_tile

Tiles a stack of images into a single image.