CMBLike
A provisional new CMB likelihood module for CosmoMC. Download cosmomc/source code (to be integrated with next cosmomc release; unzip replacing old files in cosmomc/source). New likelihood code is in Planck_like.f90.
New likelihood module reads in XXX.dataset file as usual. The dataset file specifies files giving the C_l estimators, noise C_l, covariance matrix, and fiducial model used to calculate the covariance matrix. Dataset file parameters:
- like_approx: 1: The new approximation, 2: Gaussian approximation with fixed covariance, 3. Exact full sky (Wishart)
- cl_lmin, cl_lmax: The range of l to use for calculating likelihoods
- fields_use: The fields to use for calculating the likelihoods. Can be any combination of T, E, B.
- cl_hat_file: The text file of C_l estimators, first column ell, other columns specified by cl_hat_order. If cl_hat_includes_noise=T the C_l include noise, otherwise they don't (are cross-estimators or have the noise bias subtracted). All units are muK^2, and numbers given are l(l+1)C_l/2pi.
- cl_fiducial_file: Fiducial power spectrum that was used for calculating/simulating the covariance matrix (in the same format)
- cl_noise_file: N_l noise power spectra
- covmat_fiducial: Currently a single precision binary file containing the C_l estimator covariance matrix evaluated for the fiducial model. The range of ell is specified in covmat_lmin, covmat_lmax, and ordering of the C_l in covmat_cl. The matrix has side (covmat_lmax-covmat_lmin+1)*(number of elements in covmat_cl), with the indices running from C1_{covmat_lmin..covmat_lmax},C2_{covmat_lmin..covmat_lmax},..... It must be invertible when cut from cl_lmin to cl_lmax.
The binary matrix can be read/written using AMLUtils routines MatrixSym_Read_Binary and MatrixSym_Write_Binary_Single, e.g. write matrix mat using
do i=1,n
write (file_unit) real(mat(i:n,i), kind(1.0))
end do
Should probably integrate fits option. Any standards for storing general symmetric fits matrices?
The module currently inverts the required part of the covariance matrix and caches it for future re-use. So first time it runs it can be slow to start. You can download a sample dataset file and files.
Simulation code
The likelihood approximations have been tested extensively in Hammimeche&Lewis. You can download the code used for simple hybrid Pseudo-C_l simulation of single maps with Planck-like noise (you'd have to install the mask and noise fits files separately). Assumes Healpix is installed, and is based on LensPix MPI interface to Healpix. Since probably no-one will download it, there is no documentation. Some routines may be of general use though, e.g. for calculating arrays of Pseudo-Cl coupling matrices quickly over a cluster.
Note compiling with heap-arrays option is essential for intel compilers (or generally make stack size huge).
AL Dec 07.