This IDL facility provides a means to find the index of all pixels belonging to a sperical polygon defined by its vertices

Location in HEALPix directory tree: src/idl/toolkit/query_polygon.pro 


IDL> query_polygon , Nside, Vlist, Listpix, [Nlist, HELP=, NESTED=, INCLUSIVE=]


HEALPix resolution parameter used to index the pixel list (scalar integer)
3D cartesian position vector of the polygon vertices. Array of dimension (n,3) where n is the number of vertices
on output: list of ordered index for the pixels found in the polygon. The RING numbering scheme is used unless the keyword NESTED is set. (=-1 if the polygon is too small and no pixel is found)
on output: number of pixels in Listpix (=0 if no pixel is found).


if set, the documentation header is printed out and the routine exits
if set, the output list uses the NESTED numbering scheme instead of the default RING
if set, all the pixels overlapping (even partially) with the polygon are listed, otherwise only those whose center lies within the polygon are listed


query_polygon finds the pixels within the given polygon in a selective way WITHOUT scanning all the sky pixels. The polygon should be convex, or have only one concave vertex. The edges should not intersect each other. The numbering scheme of the output list and the inclusiveness of the polygon can be changed


This section lists the routines related to query_polygon

version 6.4 or more is necessary to run query_polygon .
ang2pix, pix2ang
conversion between angles and pixel index
vec2pix, pix2vec
conversion between vector and pixel index
query_disc, query_polygon,
query_strip, query_triangle
render the list of pixels enclosed respectively in a given disc, polygon, latitude strip and triangle


query_polygon , 256L, [[0,1,1,0],[0,0,1,1],[1,0,-1,0]], listpix, nlist
On return listpix contains the index of the (131191) pixels contained in the polygon with vertices of cartesian coordinates (0,0,1), (1,0,0), (1,1,-1) and (0,1,0). The pixel indices correspond to the RING scheme with resolution 256.

Version 3.31, 2017-01-06