magpie.pixels.get_polar_shape

magpie.pixels.get_polar_shape(pixID, nphi, nr, rmin=0.0, rmax=1.0, phimin=0.0, phimax=2.0 * np.pi, proj='cart', center=[0.0, 0.0], steps=12, returnpoly=False)

Returns a polygon for the shape of a single polar coordinate pixel in polar or cartesian 2D coordinates.

Parameters
pixIDint

Pixel index in the polar grid.

nphi, nrint

Grid dimensions along the angular and radial axis.

rmin, rmaxfloat, optional

Radial ranges for the polar grid, default rmin=0 and rmax=1.

phimin, phimaxfloat, optional

Angular ranges for the polar grid, default phimin=0 and phimax=2pi.

projstr, optional

Output coordinate projection. Either ‘cart’ for cartesian or ‘polar’ for polar projection.

centerlist, optional

Center point of the polar grid, only relevant for cartesian projection, default at the origin.

stepsint

Number of steps in the polygon, default=12.

returnpolybool, optional

Return matplotlib polygon object, default=False.

Returns
x, y or p, rarray

Cartesian or polar coordinate elements for the pixel polygon.