Subsections


HEALPix conventions

A bandlimited function f on the sphere can be expanded in spherical harmonics, Ylm, as
$\displaystyle f({ \gamma})$ $\textstyle \myequal$ $\displaystyle \sum_{l=0}^{l_{max}}\sum_{m}a_{lm}Y_{lm}(\gamma),$ (4)

where ${{\gamma}}$ denotes a unit vector pointing at polar angle $\theta\in[0,\pi]$ and azimuth $\phi\in[0,2\pi)$. Here we have assumed that there is insignificant signal power in modes with l>lmax and introduce the notation that all sums over m run from -lmax to lmax but all quantities with index lm vanish for m>l. Our conventions for Ylm are defined in subsection A.4 below.

Pixelating $f({ \gamma})$ corresponds to sampling it at $N_{\rm {pix}}$ locations $\gamma_{p}$, $p\in[0,N_{\rm {pix}}-1]$. The sample function values fp can then be used to estimate alm. A straightforward estimator is

$\displaystyle \hat{a}_{lm}$ $\textstyle \myequal$ $\displaystyle \frac{4\pi}{N_{\rm {pix}}}\sum_{p=0}^{N_{\rm {pix}}-1}
Y^\ast_{lm}(\gamma_p) f(\gamma_p),$ (5)

where the superscript star denotes complex conjugation, and an equal weight was assumed for each pixel. This zeroth order estimator, as well as higher order estimators, are implemented in the Fortran90 facility anafast, included in the package.

Angular power spectrum conventions

These $\hat{a}_{lm}$ can be used to compute estimates of the angular power spectrum $\hat{C}_l$ as
$\displaystyle \hat{C}_l$ $\textstyle \myequal$ $\displaystyle \frac{1}{2l +1}\sum_{m} \vert\hat{a}_{lm}\vert^2.$ (6)

Equations (5) and (6) above do not consider the impact of a pixel masking or weighting $f(\gamma_p) \longrightarrow f(\gamma_p) w(\gamma_p)$ on the power spectrum estimation of f, which is described in Wandelt, Hivon & Górski (2001) and addressed in Hivon et al (2002), Chon et al (2004), Tristram et al (2005), Rocha et al (2009) and Planck 2015-XI (2015) among others.

The HEALPix package contains the Fortran90 facility synfast, which takes as input a power spectrum Cl and generates a realisation of $f(\gamma_p)$ on the HEALPix grid. The convention for power spectrum input into synfast is straightforward: each Cl is just the expected variance of the alm at that l.

Example: The spherical harmonic coefficient a00 is the integral of the $f(\gamma)/\sqrt{4 \pi}$ over the sphere. To obtain realisations of functions which have a00 distributed as a Gaussian with zero mean and variance 1, set C0 to 1. The value of the synthesised function at each pixel will be Gaussian distributed with mean zero and variance $1/(4\pi)$. As required, the integral of $f(\gamma)$ over the full $4\pi$ solid angle of the sphere has zero mean and variance $4\pi$.
Note that this definition implies the standard result that the total power at the angular wavenumber l is (2l+1)Cl, because there are 2l+1 modes for each l.

This defines unambiguously how the Cl have to be defined given the units of the physical quantity f. In cosmic microwave background research, popular choices for simulated maps are

* $\Delta T/T $, a dimensionless quantity measuring relative fluctuations about the average CMB temperature.
* The absolute quantity $\Delta T$ in $\mu K$ or K.


HEALPix and CMBFAST

A widely used solver of the Boltzmann equations for the computation of theoretical predictions of the spectrum of CMB anisotropy is CMBFAST (http://www.physics.nyu.edu/matiasz/CMBFAST/cmbfast.html).

CMBFAST makes its outputs in ASCII files, which instead of CX,l contain quantities defined as

DX,l $\textstyle \myequal$ $\displaystyle \frac{l(l+1)}{(2\pi)T_{CMB}^2}C_{X,l},$ (7)

where TCMB=2.726K is the temperature of the CMB today and X stands for T, E, B or C (see § A.3).

The version 4.0 of CMBFAST also created a FITS file containing the power spectra CX,l, designed for interface with HEALPix . The spectra for polarization were renormalized to match the normalization used in HEALPix 1.1, which was different from the one used by CMBFAST and by HEALPix 1.2 (see § A.3.2 for details).

The newer version of CMBFAST (4.2, released in Feb. 2003) will generate FITS files containing CX,l, with the same convention for polarization as the one used internally. It will therefore match the convention adopted by HEALPix in its version 1.2.

For backward compatibility, we provide an IDL code (convert_oldhpx2cmbfast) to change the normalization of existing FITS files created with CMBFAST 4.0. When created with the correct normalization (with CMBFAST 4.2) or set to the correct normalization (using convert_oldhpx2cmbfast), the FITS file will include a specific keyword (POLNORM = CMBFAST) in their header to identify them. The map simulation code synfast will issue a warning if the input power spectrum file does not contain the keyword POLNORM, but no attempt will be made to renormalize the power spectrum. If the keyword is present, it will be inherited by the simulated map.


Polarisation convention

Figure 4: Orthographic projection of a fake full sky for temperature (color coded) and polarization (represented by the rods). All the input Spherical Harmonics coefficients are set to 0, except for $a_{21}^{TEMP}=\ -\ a_{2-1}^{TEMP}=1$ and $a_{21}^{GRAD}=\ -\ a_{2-1}^{GRAD}=1$
Image plot_orthpolrot

Internal convention

Starting with version 1.20 (released in Feb 2003),HEALPix uses the same conventions as CMBFAST for the sign and normalization of the polarization power spectra, as exposed below (adapted from Zaldarriaga (1998)). How this relates to what was used in previous releases is exposed in A.3.2.

The CMB radiation field is described by a $2\, \times \, 2$ intensity tensor Iij (Chandrasekhar , 1960). The Stokes parameters Q and U are defined as Q=(I11-I22)/4 and U=I12/2, while the temperature anisotropy is given by T=(I11+I22)/4. The fourth Stokes parameter V that describes circular polarization is not necessary in standard cosmological models because it cannot be generated through the process of Thomson scattering. While the temperature is a scalar quantity Q and U are not. They depend on the direction of observation ${\bf n}$ and on the two axis $({\bf {e}_{1}}, {\bf {e}_{2}})$ perpendicular to ${\bf n}$ used to define them. If for a given ${\bf n}$ the axes $({\bf {e}_{1}}, {\bf {e}_{2}})$ are rotated by an angle $\psi$ such that ${{\bf {e}_{1}}}^{\prime}=\cos \psi \ {{\bf {e}_{1}}}+\sin\psi \ {{\bf {e}_{2}}} $ and ${{\bf {e}_{2}}}^{\prime}=-\sin \psi \ {{\bf {e}_{1}}}+\cos\psi \ {{\bf {e}_{2}}} $ the Stokes parameters change as

$\displaystyle Q^{\prime}$ $\textstyle \myequal$ $\displaystyle \cos 2\psi \ Q + \sin 2\psi \ U$  
$\displaystyle U^{\prime}$ $\textstyle \myequal$ $\displaystyle -\sin 2\psi \ Q + \cos 2\psi \ U$ (8)

To analyze the CMB temperature on the sky, it is natural to expand it in spherical harmonics. These are not appropriate for polarization, because the two combinations $Q\pm iU$ are quantities of spin $\pm 2$ (Goldberg , 1967). They should be expanded in spin-weighted harmonics $\, _{\pm2}Y_l^m$ (Seljak & Zaldarriaga , 1997; Zaldarriaga & Seljak , 1997),

$\displaystyle T({\bf n})$ $\textstyle \myequal$ $\displaystyle \sum_{lm} a_{T,lm} Y_{lm}({\bf n})$  
$\displaystyle (Q+iU)({\bf n})$ $\textstyle \myequal$ $\displaystyle \sum_{lm}
a_{2,lm}\;_2Y_{lm}({\bf n})$  
$\displaystyle (Q-iU)({\bf n})$ $\textstyle \myequal$ $\displaystyle \sum_{lm}
a_{-2,lm}\;_{-2}Y_{lm}({\bf n}).$ (9)

To perform this expansion, Q and U in equation (9) are measured relative to $({\bf {e}_{1}}, {\bf {e}_{2}})=({\bf {e}_\theta}, {\bf {e}_\phi})$, the unit vectors of the spherical coordinate system. Where ${\bf {e}_\theta}$ is tangent to the local meridian and directed from North to South, and ${\bf {e}_\phi}$ is tangent to the local parallel, and directed from West to East. The coefficients $_{\pm 2}a_{lm}$ are observable on the sky and their power spectra can be predicted for different cosmological models. Instead of $_{\pm 2}a_{lm}$ it is convenient to use their linear combinations

aE,lm $\textstyle \myequal$ -(a2,lm+a-2,lm)/2  
aB,lm $\textstyle \myequal$ -(a2,lm-a-2,lm)/2i, (10)

which transform differently under parity. Four power spectra are needed to characterize fluctuations in a gaussian theory, the autocorrelation between T, E and B and the cross correlation of E and T. Because of parity considerations the cross-correlations between B and the other quantities vanish and one is left with

$\displaystyle \langle a_{X,lm}^{*}
a_{X,lm^\prime}\rangle$ $\textstyle \myequal$ $\displaystyle \delta_{m,m^\prime}C_{Xl}
\quad
\langle a_{T,lm}^{*}a_{E,lm}\rangle=\delta_{m,m^\prime}C_{Cl},$ (11)

where X stands for T, E or B, $\langle\cdots \rangle$ means ensemble average and $\delta_{i,j}$ is the Kronecker delta.

We can rewrite equation (9) as

$\displaystyle T({\bf n})$ $\textstyle \myequal$ $\displaystyle \sum_{lm} a_{T,lm} Y_{lm}({\bf n})$  
$\displaystyle Q({\bf n})$ $\textstyle \myequal$ $\displaystyle -\sum_{lm} a_{E,lm} X_{1,lm}
+i a_{B,lm}X_{2,lm}$  
$\displaystyle U({\bf n})$ $\textstyle \myequal$ $\displaystyle -\sum_{lm} a_{B,lm} X_{1,lm}-i a_{E,lm} X_{2,lm}$ (12)

where we have introduced $X_{1,lm}({\bf n})=(\;_2Y_{lm}+\;_{-2}Y_{lm})/2$ and $X_{2,lm}({\bf n})=(\;_2Y_{lm}-\;_{-2}Y_{lm})/ 2$. They satisfy Y*lm = (-1)m Yl-m, X*1,lm=(-1)m X1,l-m and X*2,lm=(-1)m+1X2,l-m which together with aT,lm=(-1)m aT,l-m*, aE,lm=(-1)m aE,l-m* and aB,lm=(-1)m aB,l-m* make T, Q and U real.

In fact $X_{1,lm}({\bf n})$ and $X_{2,lm}({\bf n})$ have the form, $ {X_{1,lm}({\bf n})=\sqrt{(2l+1) / 4\pi} F_{1,lm}(\theta)\ e^{im\phi}}$ and $ {X_{2,lm}({\bf n})=\sqrt{(2l+1) / 4\pi} F_{2,lm}(\theta)\ e^{im\phi}}$, $ {F_{(1,2),lm}(\theta)}$ can be calculated in terms of Legendre polynomials (Kamionkowski et al , 1997)

$\displaystyle F_{1,lm}(\theta)$ $\textstyle \myequal$ $\displaystyle N_{lm}
\left[ -\left({l-m^2 \over \sin^2\theta}
+{1 \over 2}l(l-...
... \theta)
+(l+m) {\cos \theta \over \sin^2 \theta}
P_{l-1}^m(\cos\theta)\right]$  
$\displaystyle F_{2,lm}(\theta)$ $\textstyle \myequal$ $\displaystyle N_{lm}{m \over
\sin^2 \theta}
[ -(l-1)\cos \theta P_l^m(\cos \theta)+(l+m) P_{l-1}^m(\cos\theta)],$ (13)

where

$\displaystyle N_{lm}(\theta)$ $\textstyle \myequal$ $\displaystyle 2 \sqrt{(l-2)!(l-m)! \over (l+2)!(l+m)!}.$ (14)

Note that $F_{2,lm}(\theta)=0$ if m=0, as it must to make the Stokes parameters real.

The correlation functions between 2 points on the sky (noted 1 and 2) separated by an angle $\beta$ can be calculated using equations (11) and (12). However, as pointed out in Kamionkowski et al (1997), the natural coordinate system to express the correlations is one in which ${\bf {e}_{1}}$ vectors at each point are tangent to the great circle connecting these 2 points, with the ${\bf {e}_{2}}$ vectors being perpendicular to the ${\bf {e}_{1}}$ vectors. With this choice of reference frames, and using the addition theorem for the spin harmonics (Hu & White , 1997),

$\displaystyle \sum_m \;_{s_1} Y_{lm}^*({\bf n}_1)
\;_{s_2} Y_{lm}({\bf n}_2)$ $\textstyle \myequal$ $\displaystyle \sqrt{2l+1 \over 4 \pi}
\;_{s_2} Y_{l-s_1}(\beta,\psi_1)e^{-is_2\psi_2}$ (15)

we have (Kamionkowski et al , 1997)

$\displaystyle \langle T_1T_2 \rangle$ $\textstyle \myequal$ $\displaystyle \sum_l {2l+1 \over 4 \pi}
C_{Tl} P_l(\cos \beta)$  
$\displaystyle \langle Q_{r}(1)Q_{r}(2) \rangle$ $\textstyle \myequal$ $\displaystyle \sum_l {2l+1 \over 4 \pi} [C_{El}
F_{1,l2}(\beta)-C_{Bl} F_{2,l2}(\beta)]$  
$\displaystyle \langle U_{r}(1)U_{r}(2) \rangle$ $\textstyle \myequal$ $\displaystyle \sum_l {2l+1 \over 4 \pi}
[C_{Bl} F_{1,l2}(\beta)-C_{El} F_{2,l2}(\beta) ]$  
$\displaystyle \langle T(1)Q_{r}(2)
\rangle$ $\textstyle \myequal$ $\displaystyle - \sum_l {2l+1 \over 4 \pi} C_{Cl} F_{1,l0}(\beta)$  
$\displaystyle \langle T(1)U_{r}(2) \rangle$ $\textstyle \myequal$ 0. (16)

The subscript r here indicate that the Stokes parameters are measured in this particular coordinate system. We can use the transformation laws in equation (8) to write (Q,U) in terms of (Qr,Ur).

Using the fact that, when $\beta \rightarrow 0$, $P_l(\cos\beta) \rightarrow 1$ and $P_l^2(\cos
\beta) \rightarrow \sin^2 \beta \frac{(l+2)!}{8 (l-2)!}$, the definitions above imply that the variances of the temperature and polarization are related to the power spectra by

$\displaystyle \langle TT \rangle$ $\textstyle \myequal$ $\displaystyle \sum_l {2l+1 \over 4 \pi}
C_{Tl}$  
$\displaystyle \langle QQ \rangle + \langle UU\rangle$ $\textstyle \myequal$ $\displaystyle \sum_l {2l+1 \over 4 \pi} \left(C_{El}
+C_{Bl}\right)$  
$\displaystyle \langle TQ\rangle = \langle TU\rangle$ $\textstyle \myequal$ 0. (17)

It is also worth noting that with these conventions, the cross power CCl for scalar perturbations must be positive at low l, in order to produce at large scales a radial pattern of polarization around cold temperature spots (and a tangential pattern around hot spots) as it is expected from scalar perturbations (Crittenden et al , 1995).

Note that Eq. (12) implies that, if the Stokes parameters are rotated everywhere via

$\displaystyle \left(\begin{array}{c}
Q'\\  U'
\end{array}\right) =
\left(\be...
...array} \right)
\left(\begin{array}{c}
Q\\  U
\end{array} \right),%\nonumber
$     (18)

then the polarized alm coefficients are submittted to the same rotation
$\displaystyle \left(\begin{array}{c}
a_{E,lm}'\\  a_{B,lm}'
\end{array}\right...
...
\left(\begin{array}{c}
a_{E,lm}\\  a_{B,lm}
\end{array} \right).%\nonumber
$     (19)

Finally, with these conventions, a polarization with (Q>0,U=0) will be along the North-South axis, and (Q=0,U>0) will be along a North-West to South-East axis (see Fig. 5)


Relation to previous releases

Even though it was stated otherwise in the documention, HEALPix used a different convention for the polarization in its previous releases. The tensor harmonics approach (Kamionkowski et al (1997), hereafter KKS) was used, instead of the current spin weighted spherical harmonics. These two approaches differ by the normalisation and sign of the basis functions used, which in turns change the normalisation of the power spectra. Table 1 summarize the relations between the CMB power spectra in the different releases. See § A.2 about the interface between HEALPix and CMBFAST.

Table 1: Relation between CMB power spectra conventions used in HEALPix, CMBFAST and KKS. The power spectra on the same row are equal.
Component HEALPix $\ge$ 1.21 CMBFAST KKS HEALPix $\le$ 1.12
Temperature $C_{l}^{\rm {TEMP}} $ $C_{\rm {T},l} $ $C_{l}^{\rm T} $ $C_{l}^{\rm {TEMP}} $
Electric or Gradient $C_{l}^{\rm {GRAD}} $ $C_{\rm {E},l} $ $2C_{l}^{\rm G} $ $2C_{l}^{\rm {GRAD}} $
Magnetic or Curl $C_{l}^{\rm {CURL}} $ $C_{\rm {B},l} $ $2C_{l}^{\rm C} $ $2C_{l}^{\rm {CURL}} $
Temp.-Electric cross correlation $C_{l}^{\rm {T-GRAD}}\rule[.3cm]{0cm}{.2cm}$ $C_{\rm {C},l} $ $ -\sqrt{2}$ $C_{l}^{\rm TG} $ $\sqrt{2}C_{l}^{\rm {T-GRAD}} $
1 Version 1.2 (Feb 2003) or more recent of HEALPix package
2 Version 1.1 or older of HEALPix package

Introducing the matrices

Mlm $\textstyle \myequal$ $\displaystyle \left(
\begin{array}{cc} X_{1,lm} & i X_{2,lm} \\
-i X_{2,lm} & X_{1,lm}
\end{array} \right)$ (20)

where the basis functions X1 and X2 have been defined in Eqs. (13) and above, the decomposition in spherical harmonics coefficients (12) of a given map of the Stokes parameter Q and U can be written in the case of HEALPix 1.2 as
$\displaystyle \phantom{1.2}{
\left(
\begin{array}{c} Q \rule[.3cm]{0cm}{.2cm}\...
...}{.2cm}\\  U \rule[.3cm]{0cm}{.2cm}\rule[-.3cm]{0cm}{.2cm}\end{array}\right)
}$ $\textstyle \myequal$ $\displaystyle \sum_{lm} M_{lm} {
\left(
\begin{array}{c} -a_{lm}^{\rm GRAD} \r...
...^{\rm CURL} \rule[.3cm]{0cm}{.2cm}\rule[-.3cm]{0cm}{.2cm}\end{array}\right)
}.$ (21)

For KKS, with the same definition of M, the decomposition reads

$\displaystyle {
\left(
\begin{array}{c} Q \rule[.3cm]{0cm}{.2cm}\rule[-.3cm]{0cm}{.2cm}\\  -U \rule[.3cm]{0cm}{.2cm}\rule[-.3cm]{0cm}{.2cm}\end{array}\right)
}$ $\textstyle \myequal$ $\displaystyle \sum_{lm} M_{lm} {
\left(
\begin{array}{c} \sqrt{2}a_{{\rm E},lm...
...{{\rm B},lm} \rule[.3cm]{0cm}{.2cm}\rule[-.3cm]{0cm}{.2cm}\end{array}\right)
}$ (22)

whereas in HEALPix 1.1 it was

$\displaystyle \phantom{1.1}{
\left(
\begin{array}{c} Q \rule[.3cm]{0cm}{.2cm}\...
...}{.2cm}\\  U \rule[.3cm]{0cm}{.2cm}\rule[-.3cm]{0cm}{.2cm}\end{array}\right)
}$ $\textstyle \myequal$ $\displaystyle \sum_{lm} M_{lm} {
\left(
\begin{array}{c} -\sqrt{2}a_{lm}^{\rm ...
...^{\rm CURL} \rule[.3cm]{0cm}{.2cm}\rule[-.3cm]{0cm}{.2cm}\end{array}\right)
}.$ (23)

The difference between KKS and 1.1 was due to an error of sign on one the basis functions.

Relation with IAU convention

In a cartesian referential with axes x and y, the Stokes parameters for linear polarisation are defined such that +Q is aligned with +x, -Q with +y and +U with the bisectrix of +x and +y. Although this definition is universally accepted, some confusion may still arise from the relation of this local cartesian system to the global spherical one, as described below (Hamaker & Leahy, 2003), and as illustrated in Fig. 5.

Figure 5: Coordinate conventions for HEALPix (lhs panels) and IAU (rhs panels). The upper panels illustrate how the spherical coordinates are measured, and the lower panel how the Q and U Stokes parameters are identified in the tangential plan.
Image merge_reftqu

The polarization conventions defined by the International Astronomical Union (IAU, 1974) are summarized in Hamaker & Bregman (1996). They define at each point on the celestial sphere a cartesian referential with the x and y axes pointing respectively toward the North and East, and the z axis along the line of sight pointing toward the observer (ie, inwards) for a right-handed system.

On the other hand, following the mathematical and CMB litterature tradition, HEALPix defines a cartesian referential with the x and y axes pointing respectively toward the South and East, and the z axis along the line of sight pointing away from the observer (ie, outwards) for a right-handed system. The Planck CMB mission follows the same convention (Ansari et al, 2003).

The consequence of this definition discrepency is a change of sign of U, which, if not accounted for, jeopardizes the calculation of the Electric and Magnetic CMB polarisation power spectra.

How HEALPix deals with these discrepancies
The FITS keyword POLCCONV has been introduced in HEALPix 2.0 to describe the polarisation coordinate convention applied to the data contained in the file. Its value is either COSMO for files following the Healpix/CMB/Planck convention (default for sky map synthetized with Healpix routine synfast) or IAU for those following the IAU convention, as defined above. Absence of this keyword is interpreted as meaning COSMO.

The change_polcconv IDL facility is provided to add this keyword or change/update its value and swap the sign of the U Stokes parameter, when applicable, in an existing FITS file.

The facility anafast will crash if the map to analyze follows the 'IAU' convention, and issue a warning if the convention used can not be determined.


Spherical harmonic conventions

The Spherical Harmonics are defined as

$\displaystyle Y_{lm}(\theta,\phi)$ $\textstyle \myequal$ $\displaystyle \lambda_{lm}(\cos\theta) {\rm { e}}^{{i}
m\phi}$ (24)

where the
$\displaystyle \lambda_{lm}(x)$ $\textstyle \myequal$ $\displaystyle \sqrt{ \frac{2l+1}{4\pi}
\frac{(l-m)!}{(l+m)!} } P_{lm}(x), \quad{\rm for~}
m\ge 0$ (25)
$\displaystyle \lambda_{lm}$ $\textstyle \myequal$ $\displaystyle (-1)^m \lambda_{l\vert m\vert}, \quad{\rm for~}
m < 0,$  
$\displaystyle \lambda_{lm}$ $\textstyle \myequal$ $\displaystyle 0, \quad{\rm for}\, \vert m\vert > l.$  

Introducing $x\equiv\cos\theta$, the associated Legendre Polynomials Plm solve the differential equation

$\displaystyle (1-x^2)\frac{d^2}{dx^2}P_{lm} - 2x \frac{d}{dx}P_{lm}
+ \left(l(l+1) - \frac{m^2}{1-x^2}\right) P_{lm}$ $\textstyle \myequal$ 0. (26)

They are related to the ordinary Legendre Polynomials Pl by
Plm $\textstyle \myequal$ $\displaystyle (-1)^m (1-x^2)^{m/2} \frac{d^m}{dx^m} P_{l}(x),$ (27)

which are given by the Rodrigues formula
Pl(x) $\textstyle \myequal$ $\displaystyle \frac{1}{2^ll!}\frac{d^l}{dx^l} (x^2-1)^l.$ (28)

Note our Ylm are identical to those of Edmonds (1957), even though our definition of the Plm differ from his by a factor (-1)m (a.k.a. Condon-Shortley phase).

Version 3.31, 2017-01-06