query_triangle


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

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


FORMAT

IDL> query_triangle , Nside, Vector1, Vector2, Vector3, Listpix, [Nlist, NESTED=, INCLUSIVE=]


QUALIFIERS

Nside
HEALPix resolution parameter used to index the pixel list (scalar integer)
Vector1
3D cartesian position vector of the triangle first vertex
Vector2
3D cartesian position vector of the triangle second vertex
Vector3
3D cartesian position vector of the triangle third vertex NB : the norm of Vector* does not have to be one, what is considered is the intersection of the sphere with the line of direction Vector*.
Listpix
on output: list of ordered index for the pixels found in the triangle. The RING numbering scheme is used unless the keyword NESTED is set. (=-1 if the triangle is too small and no pixel is found)
Nlist
on output: number of pixels in Listpix (=0 if no pixel is found).


KEYWORDS

NESTED=
if set, the output list uses the NESTED numbering scheme instead of the default RING
INCLUSIVE=
if set, all the pixels overlapping (even partially) with the triangle are listed, otherwise only those whose center lies within the triangle are listed


DESCRIPTION

query_triangle finds the pixels within the given triangle in a selective way WITHOUT scanning all the sky pixels. The numbering scheme of the output list and the inclusiveness of the triangle can be changed


RELATED ROUTINES

This section lists the routines related to query_triangle

idl
version 6.4 or more is necessary to run query_triangle .
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


EXAMPLE:

query_triangle , 256L, [1,0,0],[0,1,0],[0,0,1], listpix, nlist
On return listpix contains the index of the (98560) pixels lying in the octant (x>0,y>0,y>0). The pixel indices correspond to the RING scheme with resolution 256.

Version 3.31, 2017-01-06