npix_circ_ann_center

npix_circ_ann_center(x, y, r_in, r_out, *, shape, mask=None, validate=True)

Return center-selected circular-annulus effective in-frame pixel counts.

Parameters

x, y : scalar or array_like

Aperture center coordinates in pixel units. Shapes must match after numpy.atleast_1d. The return shape matches that broadcast-free input shape, so scalar inputs return one-element arrays.

r_in, r_out : float

Inner and outer annulus radii in pixels. r_in must be nonnegative and smaller than r_out.

shape : tuple[int, int]

Image shape as (ny, nx) used to clip the aperture footprint.

mask : array_like of bool, optional = None

Boolean image mask with shape shape. True pixels are excluded from the returned effective pixel count.

Returns

npix : ndarray

Effective pixel count inside the image frame.

Notes

The annulus uses the same center convention as npix_circ_center(r_out) - npix_circ_center(r_in): the inner boundary is included and the outer boundary is excluded.