circular_overlap_grid#
- photutils.geometry.circular_overlap_grid(xmin, xmax, ymin, ymax, nx, ny, r, use_exact, subpixels)#
Area of overlap between a circle and a pixel grid. The circle is centered on the origin.
- Parameters:
- xmin, xmax, ymin, ymaxfloat
Extent of the grid in the x and y direction.
- nx, nyint
Grid dimensions.
- rfloat
The radius of the circle.
- use_exact0 or 1
If
1
calculates exact overlap, if0
usessubpixel
number of subpixels to calculate the overlap.- subpixelsint
Each pixel resampled by this factor in each dimension, thus each pixel is divided into
subpixels ** 2
subpixels.
- Returns:
- frac
ndarray
(float) 2-d array of shape (ny, nx) giving the fraction of the overlap.
- frac