sep.sum_circle

sep.sum_circle(data, x, y, r, err=None, var=None, mask=None, maskthresh=0.0, bkgann=None, gain=None, subpix=5)

Sum data in circular aperture(s).

Parameters:

data : ndarray

2-d array to be summed.

x, y, r : array_like

Center coordinates and radius (radii) of aperture(s). x corresponds to the second (“fast”) axis of the input array and y corresponds to the first (“slow”) axis. x, y = (0.0, 0.0) corresponds to the center of the first element of the array. These inputs obey numpy broadcasting rules.

err, var : float or ndarray

Error or variance (specify at most one).

mask : ndarray, optional

Mask array. If supplied, a given pixel is masked if its value is greater than maskthresh.

maskthresh : float, optional

Threshold for a pixel to be masked. Default is 0.0.

bkgann : tuple, optional

Length 2 tuple giving the inner and outer radius of a “background annulus”. If supplied, the background is estimated by averaging unmasked pixels in this annulus. If supplied, the inner and outer radii obey numpy broadcasting rules along with x, y and r.

gain : float, optional

Conversion factor between data array units and poisson counts, used in calculating poisson noise in aperture sum. If None (default), do not add poisson noise.

subpix : int, optional

Subpixel sampling factor. If 0, exact overlap is calculated. Default is 5.

Returns:

sum : ndarray

The sum of the data array within the aperture.

sumerr : ndarray

Error on the sum.

flags : ndarray

Integer giving flags. (0 if no flags set.)