npix_pill_ann_exact

npix_pill_ann_exact(
    x,
    y,
    w_in,
    a_in,
    b_in,
    w_out,
    a_out,
    b_out,
    theta_in=0.0,
    theta_out=None,
    *,
    shape,
    mask=None,
    validate=True,
)

Return exact pill-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.

w_in, a_in, b_in, w_out, a_out, b_out : float

Inner and outer pill dimensions in pixels. Inner dimensions must be smaller than the corresponding outer dimensions.

theta_in : float, optional = 0.0

Inner pill rotation angle in radians.

theta_out : float or None, optional = None

Outer pill rotation angle in radians. If None, uses theta_in.

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

Pill aperture summation currently uses Rust-generated bbox-tight pill weights and the same BoundingBox.apsum reduction.