healpy.query_polygon(nside, vertices, inclusive=False, fact=4, nest=False, ndarray buff=None)

Returns the pixels whose centers lie within the convex polygon defined by the vertices array (if inclusive is False), or which overlap with this polygon (if inclusive is True).


nside : int

The nside of the Healpix map.

vertices : float, array-like

Vertex array containing the vertices of the polygon, shape (N, 3).

inclusive : bool, optional

If False, return the exact set of pixels whose pixel centers lie within the polygon; if True, return all pixels that overlap with the polygon, and maybe a few more. Default: False.

fact : int, optional

Only used when inclusive=True. The overlapping test will be done at the resolution fact*nside. For NESTED ordering, fact must be a power of 2, less than 2**30, else it can be any positive integer. Default: 4.

nest: bool, optional

if True, assume NESTED pixel ordering, otherwise, RING pixel ordering

buff: int array, optional

if provided, this numpy array is used to contain the return values and must be at least long enough to do so


ipix : int, array

The pixels which lie within the given polygon.