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=, /HELP])


QUALIFIERS

Nside
HEALPix resolution parameter (integer, scalar or not), should be a valid Nside (power of 2 $\le 2^{29}$)
Npix
number of pixels, same size as Nside, 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.
/HELP
if set on input, the documentation header is printed, and the routine exits (with a returned value of -1 and an error flag set to 0).


DESCRIPTION

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


RELATED ROUTINES

This section lists the routines related to nside2npix

idl
version 6.4 or more is necessary to run nside2npix.
npix2nside
computes Nside corresponding to Npix
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:

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

Version 3.83, 2024-11-13