![]() |
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. Its name also comes from the fact that it is written in object-oriented style mimicking the notion of class. Classes are a wonderfull programming feature available e.g. in C++ and python, but these languages are known to be less vectorizable/parallelizable than plain C (or Fortran), and hence potentially slower. For CLASS we choose to use plain C for high performances, while organizing the code in a few modules that reproduce the architecture and philosophy of C++ classes, for optimal readability and modularity.
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.0, by clicking class_public-3.3.0.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
|