add_annulus_to_mask#
- diffsims.utils.mask_utils.add_annulus_to_mask(mask, r1, r2, x=None, y=None, fill=False)[source]#
Add an annular feature on the mask
- Parameters:
- mask: (H, W) array of dtype bool
boolean mask for an image
- r1: float
radius of the inner circle in pixels
- r2: float
radius of the outer circle in pixels
- x: float
x-coordinate of the circle center in pixels. Defaults to the center of the mask.
- y: float
y-coordinate of the circle center in pixels. Defaults to the center of the mask.
- fill: int, optional
Fill value. 0 is black (block, False) and 1 is white (pass, True)
- Returns:
- None:
the mask is adjusted inplace