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,..., 8192})
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,..., 8192}) and then computes the corresponding resolution parameter Nside.


RELATED ROUTINES

This section lists the routines related to npix2nside


idl
version 5.0 or more is necessary to run npix2nside .
nside2npix
computes Npix corresponding to Nside
ang2pix, pix2ang
conversion between angles and pixel index
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.

Eric Hivon 2003-02-07