apsum_wedge_center

apsum_wedge_center(
    data,
    x,
    y,
    r_in,
    r_out,
    theta_in,
    dtheta_in,
    theta_out=None,
    dtheta_out=None,
    *,
    mask=None,
    return_npix=True,
    validate=True,
)

Return center-selected wedge aperture sums for one or many aperture centers.

Parameters

data : array_like

Two-dimensional image. For maximum performance with raw contiguous arrays, use import astroapers._rust as aapr and call the raw functions directly.

x, y : scalar or array_like

Aperture center coordinates in pixel units. Inputs are converted to contiguous float64 arrays. 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 wedge radii in pixels. r_out must be larger than r_in and r_in must be positive.

theta_in, dtheta_in : float

Center angle and full angular width at r_in, in radians.

theta_out, dtheta_out : float or None, optional

Center angle and full angular width at r_out. If either value is None, the corresponding inner value is used.

mask : array_like of bool, optional = None

Boolean image mask with the same shape as data. True pixels are excluded from both the aperture sum and effective pixel count. Values are converted to boolean.

return_npix : bool, optional = True

If True, return (apsum, npix). If False, return only apsum.

Returns

apsum : ndarray

Sum of the unmasked data values multiplied by the aperture weights.

npix : ndarray

Effective in-frame pixel count, returned only when return_npix=True. This is the sum of aperture weights after image clipping and mask exclusion.

Notes

For more raw-call patterns, inspect astroapers.kernels; it is the Python layer that calls _rust internally. center mode uses binary weights selected by pixel-center inclusion inside the annular wedge.