nside2npix


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


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


FORMAT

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


QUALIFIERS


Nside
HEALPix resolution parameter (scalar integer), should be a valid Nside (power of 2 in {1,..., 8192})
Npix
number of pixels, Npix = 12*Nside2 if Nside is a valid resolution parameter or -1 otherwise


KEYWORDS


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


DESCRIPTION


nside2npix checks that the given Nside is valid (power of 2 in {1,..., 8192}) and then computes the corresponding number of pixels Npix = 12Nside2.


RELATED ROUTINES

This section lists the routines related to nside2npix


idl
version 5.0 or more is necessary to run nside2npix .
npix2nside
computes Nside corresponding to Npix
pix2xxx, ...
conversion between vector or angles and pixel index
nest2ring, ring2nest
conversion between NESTED and RING indices


EXAMPLE:

Npix = nside2npix(256, ERROR=error)  

Npix will be 786432 the number of pixels over the full sky for the HEALPix resolution parameter 256 and error will be 0

EXAMPLE:

Npix = nside2npix(248, ERROR=error)  

Npix will be -1 and error: 1, because 248 is not a valid value for a HEALPix resolution parameter

Eric Hivon 2003-02-07