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
The radius of the circle.
- use_exact0 or 1
1calculates exact overlap, if
subpixelnumber of subpixels to calculate the overlap.
Each pixel resampled by this factor in each dimension, thus each pixel is divided into
subpixels ** 2subpixels.
2-d array of shape (ny, nx) giving the fraction of the overlap.