sep.sum_ellipse¶
-
sep.sum_ellipse(data, x, y, a, b, theta, r, err=None, var=None, mask=None, maskthresh=0.0, bkgann=None, gain=None, subpix=5)¶ Sum data in elliptical aperture(s).
Parameters: data :
ndarray2-d array to be summed.
x, y : array_like
Center coordinates and radius (radii) of aperture(s).
xcorresponds to the second (“fast”) axis of the input array andycorresponds 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.a, b, theta : array_like
Ellipse parameters. These inputs, along with
x,y, andr, obey numpy broadcasting rules.ais the semi-major axis,bis the semi-minor axis andthetais angle in radians between the positive x axis and the major axis. It must be in the range[-pi/2, pi/2]. It is also required thata >= b >= 0.0.r : array_like, optional
Scaling factor for the semi-minor and semi-major axes. The actual ellipse used will have semi-major axis
a * rand semi-minor axisb * r. Setting this parameter to a value other than 1.0 is exactly equivalent to scaling bothaandbby the same value. Default is 1.0.err, var : float or
ndarrayError or variance (specify at most one).
mask :
ndarray, optionalMask 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 ellipse parameters.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. Default is 5.
Returns: sum :
ndarrayThe sum of the data array within the aperture.
sumerr :
ndarrayError on the sum.
flags :
ndarrayInteger giving flags. (0 if no flags set.)