slmsuite.holography.analysis.image_normalization#
- image_normalization(images, nansum=False)[source]#
Computes the zeroth order moments, equivalent to spot mass or normalization, for a stack of images.
- Parameters:
images (numpy.ndarray) – A matrix in the style of the output of
take(), with shape(image_count, h, w), where(h, w)is the width and height of the 2D images andimage_countis the number of images. A single image is interpreted correctly as(1, h, w)even if(h, w)is passed.nansum (bool) – Whether to use
numpy.nansum()in place ofnumpy.sum().
- Returns:
The normalization factor \(M_{11}\) in an array of shape
(image_count,).- Return type:
numpy.ndarray