nest2uniq


This IDL facility turns $N_{\rm side}$ and (NESTED) pixel index into the Unique Identifier .

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


FORMAT

IDL> nest2uniq, Nside, Pnest, Puniq [,/HELP]


QUALIFIERS

Nside
(IN, scalar or vector Integer) The HEALPix $N_{\rm side}$ parameter(s)
Pnest
(IN, scalar or vector Integer) (NESTED scheme) pixel identification number(s) in the range {0, $12N_{\rm side}^2-1$}. If Nside is a scalar, Pnest can a be a scalar or a vector, if Nside is a vector, Pnest must be a vector of the same size
Puniq
(OUT, same size as Pnest) The HEALPix Unique pixel identifier(s).


KEYWORDS

/HELP
If set, a documentation header is printed out, and the routine exits


DESCRIPTION

nest2uniq turns the parameter $N_{\rm side}$ (a power of 2) and the pixel index p into the Unique ID number $u = p + 4 N_{\rm side}^2$. See ''The Unique Identifier scheme'' section in ''HEALPix Introduction Document'' for more details.


EXAMPLE:

nest2uniq, [1, 2, 4], [0, 0, 0], puniq
print, puniq
returns
4 16 64
since the first pixels (p=0) at $N_{\rm side}=$ 1, 2 and 4 are respectively the pixels with Unique ID numbers 4, 16 and 64.


RELATED ROUTINES

This section lists the routines related to nest2uniq

uniq2nest
Transforms Unique HEALPix pixel ID number into Nside and Nested pixel number
pix2xxx,...
to turn NESTED pixel index into sky coordinates and back

Version 3.31, 2017-01-06