delta.utilities.getDriftTemplate

delta.utilities.getDriftTemplate(chamberboxes: List[CroppingBox], img: ndarray[Any, dtype[float32]], whole_frame: bool = False) Optional[ndarray[Any, dtype[float32]]]

This function retrieves a region above the chambers to use as drift template

Parameters
chamberboxeslist of dictionaries

See getROIBoxes().

img2D numpy array

The first frame of a movie to use as reference for drift correction.

whole_framebool, optional

Whether to use the whole frame as reference instead of the area above the chambers.

Returns
2D numpy array or None

A cropped region of the image to use as template for drift correction. If an empty list of chamber boxes is passed, None is returned. (see driftcorr()).