npix2nside

This IDL facility provides the HEALPix resolution parameter Nside corresponding to Npix pixels over the full sky.

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


FORMAT

IDL> Nside=NPIX2NSIDE (Npix [, ERROR=])


QUALIFIERS

Npix
number of pixels over the full sky (scalar integer), should be a valid Npix ( Npix= 12Nside2 with Nside power of 2 in $\{1,\ldots,2^{29}\}$)
Nside
on output: resolution parameter if Npix is valid, -1 otherwise


KEYWORDS

ERROR=
error flag, set to 1 on output if Npix is NOT valid, or stays to 0 otherwise.


DESCRIPTION

npix2nside checks that the given Npix is valid ( Npix= 12Nside2 with Nside a power of 2 in $\{1,\ldots,2^{29}\}$) and then computes the corresponding resolution parameter Nside.


RELATED ROUTINES

This section lists the routines related to npix2nside

idl
version 6.4 or more is necessary to run npix2nside .
nside2npix
computes Npix corresponding to Nside
pix2xxx, ang2xxx, vec2xxx, ...
conversion between vector or angles and pixel index and vice-versa
vec2pix, pix2vec
conversion between vector and pixel index
nest2ring, ring2nest
conversion between NESTED and RING indices


EXAMPLE:

Nside = npix2nside(49152, ERROR=error)  
Nside will be 64 because 49152 is a valid pixel number (=12*642 and 64 is a power of 2), and error will be 0

EXAMPLE:

Nside = npix2nside(49151, ERROR=error)  
Nside will be -1 and error: 1, because 49151 is not a valid number of HEALPix pixels over the full sky.

Version 3.82, 2022-07-28