NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


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 ( $N_{\rm pix} = 12N_{\rm side}^2$ with $N_{\rm side}$ 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 ( $N_{\rm pix} = 12N_{\rm side}^2$ with $N_{\rm side}$ a power of 2 in $\{1,\ldots,2^{29}\}$) and then computes the corresponding resolution parameter $N_{\rm side}$.


RELATED ROUTINES

This section lists the routines related to npix2nside


idl
version 6.1 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.

Eric Hivon 2010-06-18
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650