Spatially Inhomogeneous Correlation Estimator for Temperature and Polarisation

Anthony Challinor (Astrophysics Group, Cavendish Lab, Cambridge, UK),
Gayoung Chon (LBL, Berkeley, USA),
Stéphane Colombi (Institut d'Astrophysique de Paris, France),
Eric Hivon (IPAC/Caltech, USA & IAP),
Simon Prunet (Univ. of Toronto, Canada & IAP),
István Szapudi (Institute for Astronomy, Hawaii, USA).

PolSpice (aka Spice) is a tool to statistically analyze Cosmic Microwave Background (CMB) data, as well as any other diffuse data pixelized on the sphere.

This Fortran90 program measures the 2 point auto (or cross-) correlation functions w(θ) and the angular auto- (or cross-) power spectra C(ℓ) from one or (two) sky map(s) of Stokes parameters (intensity I and linear polarisation Q and U). It is based on the fast Spherical Harmonic Transforms allowed by isolatitude pixelisations such as HEALPix [for Npix pixels over the whole sky, and a C(ℓ) computed up to ℓ=ℓmax, PolSpice complexity scales like Npix1/2max2 instead of Npixmax2]. It corrects for the effects of the masks and can deal with inhomogeneous weights given to the pixels of the map. In the case of polarised data, the mixing of the E and B modes due to the cut sky and pixel weights can be corrected for to provide an unbiased estimate of the "magnetic" (B) component of the polarisation power spectrum. Most of the code is parallelized for shared memory (SMP) architecture using OpenMP.

- Main input files are the HEALPix sky maps to analyse, and the pixel masks and weights if any. Those can be either in FITS binary format or in Planck-HFI internal I/O format/DMC database objects.
- Main input parameters are file names, and various options such as (gaussian) beam window correction, pixel window correction, noise substraction, angular range of the correlation functions and apodization angle.
- Output w(θ) and C(ℓ) are plain text or FITS files or DMC objects.
- empirical TT C(ℓ) covariance matrix can be produced.

Extra features:
- The maps can be either in RING or NESTED scheme. They can be in full-sky or cut-sky format.
- In the case of cross-correlation, the 2 maps being analyzed should have the same coordinates
  but can have been observed with different beams, and can have different pixel sizes (ie, different Nside, since v03-03-01).
  The mask and weighting scheme applied to each map should have the same Nside as the map to which they apply;
  they can be different for each map but should spatially overlap.
- A different pixel mask can be applied to the intensity and polarization components of the map(s).
- The best fit monopole and dipole can be regressed out of unmasked pixels before the analysis (since version 02-05-08)
- IDL routines (src/, src/ are provided to run PolSpice and read its results from IDL or its free clones GDL or FL
- A python routine (src/ is provided to run PolSpice from python.
- Standard Healpix/IDL and healpy tools can be used to visualize PolSpice outputs.
- For instance, IDL ( and python ( routines are available to bin the output C(ℓ), as discussed here.
- If linked with Healpix 3.10 or above, arbitrary extensions and columns can be read from the input FITS files.

More details on the theory can be found in
Spice C(ℓ) Estimator:
-  Chon et al, 2004, MNRAS 350, 914
-  Szapudi, Prunet & Colombi, 2001, ApJ 548, 115
C(ℓ) Covariance Matrix:
-  Efstathiou, 2004, MNRAS 349, 603
-  Challinor & Chon, 2005, MNRAS 360, 509
Other cut sky C(ℓ) estimators:
-  MASTER: Hivon et al, 2002, ApJ 567, 2
-  POKER: Ponthieu et al, 2011, A&A 535, A90

Examples of PolSpice application to data analysis
CMB Science:
- BICEP 2yr data analysis: paper (Chiang et al, 2009; arXiv:0906.1181), data product
- CMBPol Mission Concept Study: Prospects for polarized foreground removal (Dunkley et al, 2008; arXiv:0811.3915)
- Planck 2013, 2015 and 2018 frequency maps (auto and cross) angular power spectra
Gravitational Lensing & Dark Matter:
- Dark Energy Survey data analysis: Cross-correlation of gravitational lensing from DES Science Verification data with SPT and Planck lensing
Neutrino & High Energy Particule Science:
- IceCube data analysis: Observation of Anisotropy in the Arrival Directions of Galactic Cosmic Rays at Multiple Angular Scales with IceCube

Requirements for installation:
- Fortran90 compiler (some are available for free for Unix, Linux, MacOSX and Windows, such as gfortran and g95)
- recent HEALPix Fortran90 library (2.10 or more required, 3.20 or more recommended)
- cfitsio library (also required by HEALPix, which needs cfitsio 3.20 or more)

Problems with PolSpice?
- Note 1: versions v02-08-00 and v03-00-01 require the flag -ffree-line-length-0 flag when compiled with gfortran
- README in html
- Known bugs
- Questions (and answers) on PolSpice usage and its results

Downloading Spice

Files available for download
   Version    Type       Date        Features
README Documentation 2018-01-16latest release documentation (also included in release tarball)
HISTORY History 2018-01-16code modification history (also included in release tarball)
INSTALL Installation 2018-01-16How to install the code (also included in release tarball)
v03-05-01 tar.gz archive 2018-01-16 latest release:
  • double precision compilation now proposed by default (see FAQ for details),
  • a compilation with CMake now possible (see INSTALL document, in PolSpice top directory).
v03-04-01 tar.gz archive 2017-08-29 previous release:
  • much faster TT, EE, BB and TE kernels calculation with optimized Wigner 3J symbols recursion (based on routines provided by Franz Elsner),
  • tenormfileout can now be used instead of windowfileout to save time and disk space on TE calculation (see FAQ for details),
  • faster analysis of small patches by ignoring empty rings,
  • reshuffled Makefile_template to accommodate new code and allow multi-job compilation (make -j).
v03-03-02 tar.gz archive 2017-04-07 old release:
- kernelsfileout now outputs apodization induced kernel even for Temperature only analysis (see FAQ for details)
v03-03-01 tar.gz archive 2017-02-21 old release:
- support for cross-correlation of maps with discrepant pixel sizes (Nside)
- introduction of python routine to bin output C(ℓ)
v03-02-00 tar.gz archive 2016-08-09old release:
* bug correction in reading of polarized cut-sky FITS maps (thanks to Tilman Troester);
* improvements to
  - documentation header,
  - deal with 9-column ASCII outputs;
* improvements to by Kyle Story:
  - added corfile argument to output angular correlation functions,
  - more efficient search for spice executable.
v03-01-06 tar.gz archive 2015-10-12old release:
- when 2 polarized maps are cross-correlated, 9 or 6 spectra are computed, depending on symmetric_cl setting
- introduced tolerance keyword for E/B decoupling
- bugs correction in keyword parsing
- new python wrapper (
- bugs correction and improvements in IDL wrapper (
- add SUBDIPOL in output FITS header
v03-00-03 tar.gz archive 2015-03-02old release:
- fixes bug with un-initialized map variables (addresses Nside≤32 problem described on cosmocoffee)
- all lines are now shorter than 132 characters (default gfortran limit)
HEALPix 3.20 or more recommended.
v03-00-01 tar.gz archive 2014-04-14old release:
- added listmapfiles*_* and listmapweights*_* options to allow linear combination of input maps
- computes correctly cross-power spectrum of 2 maps when the first one is masked or weighted (maskfile and/or weightfile are set), and the second one is not (maskfile2 and weightfile2 not set)
- turned-off monopole and dipole removal on (Q,U) maps in mask (and weight) free cases
- correct default value of extramap* in example parameter file (--help option)
See Note 1 above
v02-09-00 tar.gz archive 2013-03-29old release:
makes use of CFTISIO Extended File Name features available in HEALPix 3.10 and above, allowing the reading of arbitrary FITS extensions and columns in beam_file*, mapfile* and maskfile*.
HEALPix 3.10 or more recommended.

Back to PolSpice Main Page       Known Bugs        FAQ       

Last update for this page: 2018-10-16
Page maintained by: Eric Hivon