elliptical_overlap_grid(xmin, xmax, ymin, ymax, nx, ny, rx, ry, use_exact, subpixels)¶
Area of overlap between an ellipse and a pixel grid. The ellipse is centered on the origin.
- xmin, xmax, ymin, ymaxfloat
Extent of the grid in the x and y direction.
- nx, nyint
The semimajor axis of the ellipse.
The semiminor axis of the ellipse.
The position angle of the semimajor axis in radians (counterclockwise).
- use_exact0 or 1
If set to 1, calculates the exact overlap, while if set to 0, uses a subpixel sampling method with
subpixelsubpixels in each direction.
use_exactis 0, each pixel is resampled by this factor in each dimension. Thus, each pixel is divided into
subpixels ** 2subpixels.
2-d array giving the fraction of the overlap.