npix_pill_center
npix_pill_center(x, y, w, a, b, theta=0.0, *, shape, mask=None, validate=True)Return center-selected pill-aperture 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. w, a, b : float-
Pill rectangle length and cap semiaxes in pixels.
theta : float, optional = 0.0-
Rotation angle in radians, measured counterclockwise from the positive x axis.
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.Truepixels are excluded from the returned effective pixel count.
Returns
npix : ndarray-
Effective pixel count inside the image frame.
Notes
Pill center-mode aperture summation currently uses Rust-generated bbox-tight binary pill weights and the same BoundingBox.apsum reduction.