![]() |
C L A S Sthe Cosmic Linear Anisotropy Solving System |
![]() |
The purpose of CLASS is to simulate the evolution of linear perturbations in the universe and to compute CMB and large scale structure observables. CLASS also embeds several ways to compute non-linear corrections to linear perturbation theory. CLASS is written mainly in plain C, but with an original object-oriented style mimicking the notion of class. Since v3.2.3, some modules are actually compiled as C++, to handle the parallelisation of loops in the C++ way. The whole code is wrapped in the python module classy.
We hope that you will enjoy the use of CLASS,
Julien Lesgourgues, Nils Schöneberg, Thomas Tram
DownloadThe use of CLASS is free provided that when you use it in a publication, you cite at least the paper CLASS II: Approximation schemes (reference below). You are welcome to cite any other CLASS paper if relevant!
There are three ways to get to use CLASS. If you only want to use it through its python wrapper classy and not modify it, just install it as a python module with pip install classy. If you want to see the code and/or modify it just for yourself, download a tar.gz archive of the latest released (master branch) version, v3.3.1, by clicking class_public-3.3.1.tar.gz. But if you are familiar with git repositories, and you wish to develop a new branch of the code, or see all public branches and/or old versions, you will prefer to clone it from the class_public git repository.
DocumentationAfter downloading the code, unpack the archive (tar -zxvf class_public-vx.y.z.tar.gz), go to the class directory (cd class_public-vx.y.z/) and compile. Several details on the CLASS compilation are given on the installation wiki page. In a nutshell:
For more details, view our online html documentation generated by doxygen (credits D.C. Hooper). Other CLASS papers dedicated to various aspects of the code are listed below. You can also look at slides from CLASS-dedicated courses. To use CLASS from python, or ipython notebooks, or from the Monte Python parameter extraction code, you need to compile not only the code, but also its python wrapper. This can be done by typing just make instead of make class. More details on the wrapper and its compilation are found on the wiki page. Since version 2.3, the package includes an improved plotting script called CPU.py (Class Plotting Utility), written by Benjamin Audren and Jesus Torrado. It can plot the Cl's, the P(k) or any other CLASS puput, for one or several models, as well as their ratio or percentage difference. The syntax and list of available options is obtained by typing pyhton CPU.py --help. There is a similar script for MATLAB, written by Thomas Tram. To use it, once in MATLAB, type help plot_CLASS_output.m If you want to develop the code, we suggest that you download it from the github webpage rather than from class-code.net. Then you will enjoy all the feature of git repositories. You can even develop your own branch and get it merged to the public distribution, following the public contributing instructions. Papers
|