Cosmomc 2d contours

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Anze Slosar
Posts: 183
Joined: September 24 2004
Affiliation: Brookhaven National Laboratory

Cosmomc 2d contours

Post by Anze Slosar » March 31 2006


What exactly is the algorithm used for 2D contouring in cosmomc getdist's matlab scripts?

The algorithm I used before and I think it is sensible is to grid samples on a 2d grid, sort the cells by the density and then go from the densenst to the least dense cell until 68% (95%) of all samples are enclosed and record the density at that point which is then used as contouring level. Is something similar used in getdist?

Antony Lewis
Posts: 1498
Joined: September 23 2004
Affiliation: University of Sussex

Re: Cosmomc 2d contours

Post by Antony Lewis » March 31 2006

Yes, where the bin values are given by a Gaussian weighting given by the distance from the bin centre, with appropriate compensation for priors when near sharp prior boundaries. Technically it does it by a binary search on the density rather than sorting for 2D case. See Get2DPlotData. It is not very efficient.

Should check results are stable under increasing the number of bins - smoothing can make contours look larger than they really are, depending on how sharply the likelihood falls off.

Post Reply