The final take on angular power spectra in HEALPix?

I’ve been working on the problem of computed the angular power spectrum for quite some time now, and nothing quite satisfied my needs.

The problem is as follows: For a given map in the HEALPix format (Gorski+ 2005), the angular power spectrum of a map (or the cross power between two maps) needs to be computed in the presence of masks. This problem is far from trivial and has been studied for a while, most notably probably by Eric Hivon (Hivon+ 2002) in his work on the MASTER algorithm.

The various packages that are around to do this are great efforts to address this issue, but most often suffer certain weaknesses such as insufficient maintenance, no python wrapper, hyper parameters that need to be tuned, or simply lack of performance.

Last week, we had David Alonso from Oxford visit Caltech/JPL, and he introduced me to NaMaster, which is his implementation of the MASTER code. It can be bit tricky to install (libsharp is required, and I would recommend using the homebrew gcc-6 instead of clang on MacOS), but it is certainly worth it. I wish I had known about this earlier, since it addresses all my needs:

  • No fine tuning of parameters
  • Clear API
  • Flexible binning of the power spectra
  • Written in C with a great python wrapper
  • Python 2 and 3 support
  • Great documentation, including examples
  • Covers flat fields as well

We’re currently working on porting this to Python 3 as well, with the hope of making this the standard library for large upcoming surveys such as LSST.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s