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.

xmin, xmax, ymin, ymaxfloat

Extent of the grid in the x and y direction.

nx, nyint

Grid dimensions.


The radius of the circle.

use_exact0 or 1

If 1 calculates exact overlap, if 0 uses subpixel number of subpixels to calculate the overlap.


Each pixel resampled by this factor in each dimension, thus each pixel is divided into subpixels ** 2 subpixels.

fracndarray (float)

2-d array of shape (ny, nx) giving the fraction of the overlap.