elliptical_overlap_grid

photutils.geometry.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.

Parameters:
xmin, xmax, ymin, ymaxfloat

Extent of the grid in the x and y direction.

nx, nyint

Grid dimensions.

rxfloat

The semimajor axis of the ellipse.

ryfloat

The semiminor axis of the ellipse.

thetafloat

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 subpixel subpixels in each direction.

subpixelsint

If use_exact is 0, each pixel is resampled by this factor in each dimension. Thus, each pixel is divided into subpixels ** 2 subpixels.

Returns:
fracndarray

2-d array giving the fraction of the overlap.