apsum_ellip_ann_center
apsum_ellip_ann_center(
data,
x,
y,
a_in,
b_in,
a_out,
b_out,
theta_in=0.0,
theta_out=None,
*,
mask=None,
return_npix=True,
validate=True,
)Return center-selected elliptical-annulus 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 aaprand call the raw functions directly. x, y : scalar or array_like-
Aperture center coordinates in pixel units. Inputs are converted to contiguous
float64arrays. Shapes must match afternumpy.atleast_1d. The return shape matches that broadcast-free input shape, so scalar inputs return one-element arrays. a_in, b_in, a_out, b_out : float-
Inner and outer ellipse semiaxes in pixels. Inner axes must be no larger than the corresponding outer axes, and at least one outer axis must be larger.
theta_in : float, optional = 0.0-
Inner ellipse rotation angle in radians.
theta_out : float or None, optional = None-
Outer ellipse rotation angle in radians. If
None, usestheta_in. mask : array_like of bool, optional = None-
Boolean image mask with the same shape as
data.Truepixels 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). IfFalse, return onlyapsum.
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. For matched inner and outer angles, this uses outer-minus-inner direct center aperture summation. For split-angle annuli, it uses Rust-generated bbox-tight annulus weights and the same center-boundary convention as bbox-tight weights.