Home - s-ilic/ECLAIR GitHub Wiki

Welcome to the ECLAIR wiki!

For those in a hurry...

pip install numpy scipy matplotlib corner getdist emcee zeus-mcmc # Install required packages
pip install mpi4py schwimmbad                                     # Also those if you want to use MPI

git clone https://github.com/lesgourg/class_public.git            # Download CLASS 
cd class_public && make && cd ..                                  # and install if you don't have it

git clone https://github.com/s-ilic/ECLAIR.git                    # Download the ECLAIR code and
cd ECLAIR                                                         # do a quick run to test if it works
python ECLAIR_mcmc.py inputs/example_short.ini                    # properly

If you have a bit more time, head to the Usage section for a more detailed description on how to use ECLAIR.

Description of the code

The ECLAIR suite of codes is meant to be used as a general inference tool, allowing to sample the posterior distribution of a set of parameters corresponding to a particular physical model, under the constraint of a number of datasets/likelihoods. As such, it brings together state-of-the-art datasets (contained in the likelihoods directory), efficient affine-invariant ensemble sampling algorithms (via the emcee and zeus modules), and interfaces seamlessly to the powerful CLASS Boltzmann solver or any custom modification of it. It is massively parallelizable, either by using of multiple threads on a given machine (via the standard multiprocessing module) or distributing computation with MPI (via the mpi4py and schwimmbad module). In its current iteration, ECLAIR is primarily aimed at cosmologists wanting to test any potential cosmological model again current data, although a generalization of the code to any type of problem is completely feasible and planned for the near future.

The ECLAIR suite also contains a robust maximizer aimed at finding the point in parameter space corresponding to the best likelihood of any considered model, using a novel technique which combines affine-invariant ensemble sampling with simulated annealing to converge reliably towards the global maximum of the posterior. The same method is also available to the ECLAIR user in order to perform profile likelihoods in any number of dimensions.

The suite also include a plotting script allowing to conveniently diagnose and check the convergence of a chain. The script also interfaces very easily to the popular getdist package, allowing to produce summary statistics (marginalized posterior distribution, credibility intervals, etc.) on the parameters of interest.

Table of contents