elliptical_mask#

elliptical_mask(shape, radius, center)[source]#

Creates an ellipsoidal mask.

Parameters:
shapetuple of ints

Shape of the mask to be created.

radiustuple of floats

Radius of the ellipse.

centertuple of ints

Center of the ellipse.

Returns:
NDArray

The created ellipsoidal mask.

Raises:
ValueError

If the length of center and radius is not one or the same as shape.

Examples

>>> from tme.matching_utils import elliptical_mask
>>> mask = elliptical_mask(shape = (20,20), radius = (5,5), center = (10,10))