sep.flux_radius¶
- sep.flux_radius(data, x, y, rmax, frac, normflux=None, mask=None, maskthresh=0.0, subpix=5)¶
Return radius of a circle enclosing requested fraction of total flux.
- Parameters
- data
ndarray
2-d array to be summed.
- x, yarray_like
Center coordinates and radius (radii) of aperture(s).
x
corresponds to the second (“fast”) axis of the input array andy
corresponds to the first (“slow”) axis.x, y = (0.0, 0.0)
corresponds to the center of the first element of the array. Shapes must match.- rmaxarray_like
Maximum radius to analyze. Used as normalizing flux if
normflux
is None. Shape must match x and y.- fracarray_like
Requested fraction of light (in range 0 to 1). Can be scalar or array.
- normfluxarray_like, optional
Normalizing flux for each position. If not given, the sum within
rmax
is used as the normalizing flux. If given, shape must match x, y and rmax.- mask
ndarray
, optional Mask array. If supplied, a given pixel is masked if its value is greater than
maskthresh
.- maskthreshfloat, optional
Threshold for a pixel to be masked. Default is
0.0
.- segmap
ndarray
, optional Segmentation image with dimensions of
data
and dtypenp.int32
. This is an optional input and corresponds to the segmentation map output byextract
.- seg_idarray_like, optional
Array of segmentation ids used to mask additional pixels in the image. Dimensions correspond to the dimensions of
x
andy
. The behavior differs depending on whetherseg_id
is negative or positive. Ifseg_id
is positive, all pixels belonging to other objects are masked. (Pixelj, i
is masked ifseg[j, i] != seg_id and seg[j, i] != 0
). Ifseg_id
is negative, all pixels other than those belonging to the object of interest are masked. (Pixelj, i
is masked ifseg[j, i] != -seg_id
). NB: must be included if ``segmap` is provided.- subpixint, optional
Subpixel sampling factor. Default is 5.
- data
- Returns
- radius
ndarray
The sum of the data array within the aperture(s). Shape is same as
x
, except iffrac
is an array; then the dimension offrac
will be appended. For example, ifx
andfrac
are both 1-d arrays, the result will be a 2-d array with the trailing dimension corresponding tofrac
.- flags
ndarray
Integer giving flags. Same shape as
x
. (0 if no flags set.)
- radius