[ANN] Cosmology on the sphere with PowerSpectra.jl, WignerFamilies.jl, and Healpix.jl 3.0

Here are some related packages for the analysis of sky maps. In cosmology, this is sometimes called “curved sky” data analysis, since observations are made on the celestial sphere. These packages have been around for a while, but I think they’ve recently reached an improved level of usability.

Healpix.jl is mostly by @Maurizio_Tomasi and implements basic functions for working with the Hierarchical Equal Area isoLatitude Pixelization, known as HEALPix. It’s a nice way to divide the sphere into equal-area pixels. I’ve been working with Maurizio to add some features for v3.0, which was released this year, including spherical harmonic transforms (via libsharp) and arbitrary underlying array type. It’s close to feature parity with other implementations of HEALPix, and also made its way to ASCL recently.

WignerFamilies.jl is a package for computing Wigner 3-j symbols via recurrence relation. These symbols arise naturally from integrals of spherical harmonics, such as in estimators for spectra and lensing. This particular method is good for applications that require summing over many such symbols, and I think it’s the fastest such library out there. For example, it beats SLATEC (the usual choice for cosmologists) by a factor of 2-4.

PowerSpectra.jl estimates spectra (C_{\ell}) and analytic covariances on the masked sky. A statistic on the sky becomes biased if you need to mask out parts of the sphere you don’t want, like the Milky Way or point sources. Ground-based observatories also can’t see through the ground, so they have a mask imposed by their survey strategy. You can correct for this effect by doing some summations of 3-j symbols, through the estimation of a mode-coupling matrix. The quickstart example, which uses real downgraded maps and survey masks, may be helpful. I think the interface for covariance matrix estimation is still a little rough around the edges.

These packages all have their own tests, but they’ve also been subjected to a careful end-to-end validation – I’ve led an analysis of a legacy dataset (Planck PR3) using this software stack, and made detailed comparisons with the official analysis (arxiv). That work is composed of literate scripts using Literate and Documenter, which may be helpful as examples (coincidentally, elements of this analysis were also done back in the day by @marius311 as a member of the Planck collaboration).