Subsections

Geometric and Algebraic Properties of HEALPix

HEALPix is a genuinely curvilinear partition of the sphere into exactly equal area quadrilaterals of varying shape. The base-resolution comprises twelve pixels in three rings around the poles and equator.

The resolution of the grid is expressed by the parameter $N_{\mathrm{side}}$ which defines the number of divisions along the side of a base-resolution pixel that is needed to reach a desired high-resolution partition.

All pixel centers are placed on $4\times N_{\mathrm{side}}-1$ rings of constant latitude, and are equidistant in azimuth (on each ring). All iso-latitude rings located between the upper and lower corners of the equatorial base-resolution pixels, the equatorial zone, are divided into the same number of pixels: $N_{\mathrm{eq}}= 4\times N_{\mathrm{side}}$. The remaining rings are located within the polar cap regions and contain a varying number of pixels, increasing from ring to ring with increasing distance from the poles by one pixel within each quadrant.

Pixel boundaries are non-geodesic and take the very simple forms $\cos \theta = a \pm b \cdot \phi $ in the equatorial zone ( $\vert\cos \theta\vert \le 2/3$), and $\cos \theta = a + b / \phi^2 $, or $\cos \theta = a + b / (\pi/2 - \phi) ^2 $, in the polar caps, with $\theta$ being the co-latitude, and $\phi$ the longitude. This allows one to explicitly check by simple analytical integration the exact area equality among pixels (Górski et al., 2005), and to compute efficiently more complex objects, e.g. the Fourier transforms of individual pixels.

Figure 3: Cylindrical projection of the HEALPix division of a sphere and two natural pixel numbering schemes (RING and NESTED) allowed by HEALPix. Both numbering schemes map the two dimensional distribution of discrete area elements on a sphere into the one dimensional, integer pixel number array, which is essential for computations involving data sets with very large total pixel numbers. From top to bottom: Panel one (resolution parameter $N_{\mathrm{side}}= 2$) and panel two ( $N_{\mathrm{side}}= 4$) show the RING scheme for pixel numbering, with the pixel number winding down from north to south pole through the consecutive isolatitude rings. Panel three (resolution parameter $N_{\mathrm{side}}= 2$) and panel four ( $N_{\mathrm{side}}= 4$) show the NESTED scheme for pixel numbering within which the pixel number grows with consecutive hierarchical subdivisions on a tree structure seeded by the twelve base-resolution pixels.
Image introf2

RING and NESTED numbering schemes

Specific geometrical properties allow HEALPix to support two different numbering schemes for the pixels, as illustrated in Figure 3.

First, in the RING scheme, one can simply count the pixels moving down from the north to the south pole along each iso-latitude ring. It is in the RING scheme that Fourier transforms with spherical harmonics are easy to implement.

Second, in the NESTED scheme, one can arrange the pixel indices in twelve tree structures, corresponding to base-resolution pixels. Each of those is organised as shown in Fig. 1. This can easily be implemented since, due to the simple description of pixel boundaries, the analytical mapping of the HEALPix base-resolution elements (curvilinear quadrilaterals) into a [0,1]$\times$[0,1] square exists. This tree structure allows one to implement efficiently all applications involving nearest-neighbour searches (Wandelt, Hivon & Górski, 1998), and also allows for an immediate construction of the fast Haar wavelet transform on HEALPix.


The Unique Identifier scheme

As exposed above, a HEALPix pixel is identified by three variables: its numbering scheme (RING or NESTED), its resolution or size parameter $N_{\mathrm{side}}= 2^k$ (where $k$ is a integer sometimes called 'order'), and its index $p$ lying in $[0, 12N_{\mathrm{side}}^2-1]$. Since some applications require to process simultaneously pixels of different resolutions, it is possible to merge the resolution $N_{\mathrm{side}}$ and index $p$ into a single unique number $u$

$\displaystyle u = p + 4 N_{\mathrm{side}}^2,$ (1)

so that all pixels with $N_{\mathrm{side}}=1$ have the unique indices 4 to 15, those with $N_{\mathrm{side}}= 2$ are in the range 16 to 63, and so on (Reinecke & Hivon, 2015), thus simplifying the handling of data with heteregenous $N_{\mathrm{side}}$. Splitting the unique index $u$ into its original $N_{\mathrm{side}}$ and $p$ is as simple as

$\displaystyle N_{\mathrm{side}}$ $\displaystyle = 2^{\mathrm{floor}\left( \log_2(u/4)/2 \right)},$ (2)
$\displaystyle p$ $\displaystyle = u - 4 N_{\mathrm{side}}^2,$ (3)

giving immediate access to the usual pixel based tools.

This unique indexing could in principle be applied to both the RING and NESTED schemes, even though the latter appears more relevant for a hierarchical description of data with variable resolutions: since, as noted previously, a pixel with NESTED index $p$ at resolution $N_{\mathrm{side}}$ is subdivided in four pixels with index $4p,\, 4p+1,\, 4p+2,\, 4p+3$ at resolution $2N_{\mathrm{side}}$, Eq. (1) shows that a pixel with Nested-based unique identifier $u$ is subdivided in four smaller pixels whose unique identifiers are $4u,\, 4u+1,\, 4u+2,\, 4u+3$. This Nested-based Unique identification is for instance the basis of the NUNIQ storage scheme used for Multi-Order Coverage map (MOC) description of astronomical datasets proposed for virtual observatories (Boch et al., 2014).

Routines implementing Eqs (1) and (2, 3) in various languages have been available since release 3.30.

Version 3.83, 2024-11-13