Public repository of the Cosmic Linear Anisotropy Solving System
Clone or download
lesgourg removed useless .ini and .pre files; added input files matching Planc…
…k baseline models; struct_cleanup() now done automatically; several minor bug fixes

* 2.7:
  updated version number to 2.7.1 and doc
  small improvements in setup.py with absolute directory paths
  completed the fix for minor precision issue, relevant only with k_output_values + rkck evolver
  fixed small things for a neat compilation even with -Wall
  Completed changes in output for _cb with isocurvature; output indented; not yet tested
  Fixed comments and indentation in _cb part of spectra.c
  P_cb changes reviewed and checked up to transfer.c included
  added comment and improved style of P_cb correction  in nonlinear m odule. Yet to be tested.
  fixed minor precision issue, relevant only with k_output_values + rkck evolver
  Fixed small scanf counting mistake.
  updated the set of .pre files
  updated the set of .ini files
  Fixed whitespace and indentation.
  fixed a problem in the manual from release 2.7, and removed unnecessary files from the RSI
  Python wrapper: Prevent memory leaks from occuring.
  fixed small inconsistency in many_times.ipynb leading to errors with linux
  Added handling of printouts, which were generating spurious warnings during compilation. Furthermore, the code should be slightly safer now.
Latest commit 3dc7888 Oct 22, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
RealSpaceInterface fixed a problem in the manual from release 2.7, and removed unnecessa… Sep 14, 2018
bbn corrected new BBN file: uses Yp, not Yp^BBN; added marcucci et al. ve… Jul 16, 2017
cpp clarified the readme of cpp May 9, 2014
doc updated version number to 2.7.1 and doc Oct 22, 2018
external_Pk fixed other python 2/3 compatibility issues by hand Aug 22, 2016
hyrec Fixed small scanf counting mistake. Oct 5, 2018
include updated version number to 2.7.1 and doc Oct 22, 2018
main include/transfer.h Mar 6, 2014
notebooks fixed small inconsistency in many_times.ipynb leading to errors with … Sep 12, 2018
output restore output directory Oct 12, 2014
python small improvements in setup.py with absolute directory paths Oct 22, 2018
scripts added 11 notebooks and equivalent scripts (cambridge version) Sep 10, 2018
source completed the fix for minor precision issue, relevant only with k_out… Oct 22, 2018
test added test_loops_omp, a test code with nested openMP (different insta… Mar 17, 2016
tools taken care of the case thatan x-array with 2 entries only needs to be… Jul 3, 2018
.gitignore fixed a problem in the manual from release 2.7, and removed unnecessa… Sep 14, 2018
CPU Restored the old CPU, waiting for CPU.py to be fully operational May 9, 2014
CPU.py fixed other python 2/3 compatibility issues by hand Aug 22, 2016
Makefile Fixed Makefile to not link classy with OpenMP if CLASS was compiled w… Mar 24, 2017
README.md finsihed updates to doc for v2.6.0 Mar 25, 2017
REFCLASS.pre changes in lensings quadrature and in transfer k list Feb 17, 2011
REFCLASS_tClpCl.pre corrected bug for computing lCl alone, changed management of xmax in … Feb 15, 2011
base_2015_plikHM_TT_lowTEB_lensing.ini updated the set of .ini files Oct 5, 2018
base_2018_plikHM_TTTEEE_lowl_lowE_lensing.ini updated the set of .ini files Oct 5, 2018
cl_permille.pre fixed cl_ref, but problem when using it in closed case Dec 4, 2013
cl_ref.pre fixed new precision settings for halofit Sep 21, 2017
explanatory.ini Merge branch '2.6' into devel Oct 24, 2017
myevolution.dat added selection and evolution function read from file Mar 5, 2014
myselection.dat added selection and evolution function read from file Mar 5, 2014
pk_ref.pre fixed new precision settings for halofit Sep 21, 2017
plot_CLASS_output.m Cherry picked version of the devel branch (2.3.2) May 26, 2014
psd_FD_single.dat adding a sample psd file, and updated README file and warnings in pet… Nov 7, 2011

README.md

CLASS: Cosmic Linear Anisotropy Solving System {#mainpage}

Authors: Julien Lesgourgues and Thomas Tram

with several major inputs from other people, especially Benjamin Audren, Simon Prunet, Jesus Torrado, Miguel Zumalacarregui, Francesco Montanari, etc.

For download and information, see http://class-code.net

Compiling CLASS and getting started

(the information below can also be found on the webpage, just below the download button)

Download the code from the webpage and unpack the archive (tar -zxvf class_vx.y.z.tar.gz), or clone it from https://github.com/lesgourg/class_public. Go to the class directory (cd class/ or class_public/ or class_vx.y.z/) and compile (make clean; make class). You can usually speed up compilation with the option -j: make -j class. If the first compilation attempt fails, you may need to open the Makefile and adapt the name of the compiler (default: gcc), of the optimization flag (default: -O4 -ffast-math) and of the OpenMP flag (default: -fopenmp; this flag is facultative, you are free to compile without OpenMP if you don't want parallel execution; note that you need the version 4.2 or higher of gcc to be able to compile with -fopenmp). Many more details on the CLASS compilation are given on the wiki page

https://github.com/lesgourg/class_public/wiki/Installation

(in particular, for compiling on Mac >= 10.9 despite of the clang incompatibility with OpenMP).

To check that the code runs, type:

./class explanatory.ini

The explanatory.ini file is THE reference input file, containing and explaining the use of all possible input parameters. We recommend to read it, to keep it unchanged (for future reference), and to create for your own purposes some shorter input files, containing only the input lines which are useful for you. Input files must have a *.ini extension.

If you want to play with the precision/speed of the code, you can use one of the provided precision files (e.g. cl_permille.pre) or modify one of them, and run with two input files, for instance:

./class test.ini cl_permille.pre

The files *.pre are suppposed to specify the precision parameters for which you don't want to keep default values. If you find it more convenient, you can pass these precision parameter values in your *.ini file instead of an additional *.pre file.

The automatically-generated documentation is located in

doc/manual/html/index.html
doc/manual/CLASS_manual.pdf

On top of that, if you wish to modify the code, you will find lots of comments directly in the files.

Python

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' (or for speeding up: 'make -j'). More details on the wrapper and its compilation are found on the wiki page

https://github.com/lesgourg/class_public/wiki

Plotting utility

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 output, 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 -h'. There is a similar script for MATLAB, written by Thomas Tram. To use it, once in MATLAB, type 'help plot_CLASS_output.m'

Developing the code

If you want to develop the code, we suggest that you download it from the github webpage

https://github.com/lesgourg/class_public

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. For related instructions, check

https://github.com/lesgourg/class_public/wiki/Public-Contributing

Using the code

You can use CLASS freely, provided that in your publications, you cite at least the paper CLASS II: Approximation schemes <http://arxiv.org/abs/1104.2933>. Feel free to cite more CLASS papers!

Support

To get support, please open a new issue on the

https://github.com/lesgourg/class_public

webpage!