|
|
The use of CLASS is free provided that if you use it in a publication,
you will cite at least the paper CLASS II: Approximation schemes (reference below). You are welcome to cite any other CLASS paper if relevant!
After downloading
the code, unpack the archive (tar -zxvf class.tar.gz), go to
the class directory (cd class/) and compile (make
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 optization flag
(default: -O4) 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; some users of Mac OS 10.7 even reported that they needed gcc-4.5 or gcc-mp-4.3 in order to compile the CLASS libraries, but this is anyway an advanced step that you probably don't need).
Adapt your input parameters in the file explanatory.ini
and run with ./class explanatory.ini. Or, even better, make a
copy of explanatory.ini into another file, for
instance test.ini, and remove everything in test.ini
that you judge useless for your own purpose: in that way you can keep
explanatory.ini as a reference file, and play with a more concise and
friendly input file. You can then run with ./class test.ini. 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 (e.g. ./class test.ini cl_permille.pre).
The following precision files are less accurate/faster than the default
settings: chi2pl10.pre (fastest setting), chi2pl1.pre.
The following ones are more accurate/slower than the default settings:
from lowest to highest accuracy,
chi2pl0.1.pre,
cl_3permille.pre,
cl_2permille.pre,
cl_permille.pre,
cl_ref.pre,
pk_ref.pre.
A simplified documentation can be found in the CLASS I: Overview paper. On
top of that, if you wish to modify the code, you will find lots of
comments directly into the files (and the amount of such comments will
increase with the version number). A more complete documentation may
become available some day if enough users ask for it...
- CLASS I: Overview, by J. Lesgourgues, arXiv:1104.2932 [astro-ph.IM]
- CLASS II: Approximation schemes, by D. Blas, J. Lesgourgues, T. Tram, arXiv:1104.2933 [astro-ph.CO], JCAP 1107 (2011) 034
- CLASS III: Comparision with CAMB for LambdaCDM, by J. Lesgourgues, arXiv:1104.2934 [astro-ph.CO]
- CLASS IV: Efficient implementation of non-cold relics, by J. Lesgourgues, T. Tram, arXiv:1104.2935 [astro-ph.CO], JCAP 1109 (2011) 032
- Efficient computation of the non-linear matter power spectrum of LambdaCDM, by B. Audren, J. Lesgourgues, arXiv:1106.2607 [astro-ph.CO], JCAP 1110 (2011) 037
| v1.4 (13.02.2012) |
- recombination can be computed either with RECFAST v1.5, or with the HyRec code by Y. Ali-Haimoud & C. Hirata. Just set the input parameter recombination to either RECFAST or HyRec. HyRec is slower, but more precise and flexible. Both codes agree at the level of precision of Planck and for standard cosmology. The November 2011 version of HyRec is distributed together with v1.4. Class can be compiled without HyRec by leaving HYREC = blank in the Makefile, instead of putting there the path to HyRec (default: compiled with the distributed version, located in class/hyrec/) (credits Y. Ali-Haimoud and C. Hirata)
- user can choose between the same reionization history as in CAMB (featuring a single step for hydrogen reionization), or a binned reionization history, with arbitrary bin number, position and width (similar to implementation in Lewis, Weller and Battye (2006)). Set input parameter reionization to either reio_camb or reio_bins_tanh, and see explanatory.ini for more details on input parameters (binned_reio_z, binned_reio_z, etc.)
- user can choose to pass a numerical value for the primordial helium fraction YHe, or let it be fixed as a function of omega_b and N_eff by standard BBN calculations, by setting YHe to BBN (as in Hamann, Lesgourgues and Mangano (2008))
- includes latest version of HALOFIT, working even in presence of massive neutrinos (from Bird, Viel and Haehnelt (2011)). Set non linear to HALOFIT to get the non-linear P(k) (credits B. Audren and S. Bird)
- improved newtonian gauge: phi is integrated over time rather than infered from constraint equation; in that way newtonian gauge calculations are more accurate than in v1.3, and remain stable even in presence of isocurvature modes or massive neutrinos (credits Guido W. Pettinari)
- user can choose to pass some numerical values for the tensor tilt and running (n_t, alpha_t), or let them be fixed by the two self-consistency conditions of single field slow-roll inflation, by setting these entries to scc (see explanatory.ini for details)
- if output includes dCl, the code will compute the Cl spectra of matter density perturbations in an arbitrary number of redshift bins (defined by gaussian window functions, with arbitrary centers and widths, fixed through input variables selection_mean and selection_width). The output ..._cl.dat file will then contain CMB (if requested) plus density spectra, including all possible cross-correlations. See explanatory.ini for details on input parameters.
- corrected a few bugs previously affecting temperature/polarization tensor spectra.
- python wrapper for class, available in the python/ directory (see python/README). Used by the cosmological parameter extraction code that we will release soon (credits K. Benabed and B. Audren)
- c++ wrapper for class, available in the cpp/ directory (see cpp/README) (credits S. Plaszczynski)
|
| v1.3 (08.11.2011) |
- implementation of the Newtonian / longitudinal gauge equations on top of the
synchronous ones. The user can choose the gauge by writing
e.g. gauge=newtonian in the input file (by default, set to
synchronous gauge). The Newtonian gauge calculations turn out to be
essentially as stable, fast and accurate as the synchronous ones for
LambdaCDM. Instabilities may occur when ncdm (= non-cold dark matter, e.g. massive neutrinos)
and/or isocurvature modes are turned on: in those two cases, the code
outputs roughly the right answer (provided that the tol_ncdm
precision parameter is decreased by a factor 100), but the convergence
of the spectra in the limit of increased precision parameters is not
obvious.
- by default, the component called fluid can have not only an
arbitrary sound speed, but also a time-varying equation of state of
the form w=w0+wa*(1-a/a0); a couple of bugs in this fluid sector have been
fixed.
- CPU (Class Plotting Utility) upgraded to version 1.3, with an extra
option -colnum N useful for plotting polarisation and lensing
potential spectra. More details on CPU in the README file.
- issue of initial conditions in the power spectrum renormalisation module trg.c fixed according to discussion in Audren & Lesgourgues 2011.
|
| v1.2 (13.06.2011) |
- new trg.c module allowing to compute the non-linear density, velocity and cross density-velocity power spectra on mildly non-linear scales, using either the dynamical 1-loop method (fast) or the Time Renormalization Group method (1 hour/number of CPU); see Audren & Lesgourgues 2011.
In the input file, you just need to set non linear=one-loop or non linear=trg.
So far, this module works only for LambdaCDM with no non-cold relics or dark energy.
- fast mode for CMB lensed spectra calculation. Speeds up the code significantly. For very accurate calculations, you can still tune the precision parameter accurate_lensing and use the previous method. Credits: Simon Prunet.
- in input file, user can choose the format of output files: format=class for CLASS format (as in previous versions), format=camb for camb-like format (compatible with Healpix, etc.). Also, all output file headers can be omitted with headers=no.
- convenient python module named CPU for plotting CLASS output spectra. Can plot one or several spectra, or the relative difference between two spectra (even when they are sampled with different values, as it is usually the case for P(k)'s). Works for C_l^TT and P(k). Detects the type of output file and infers axes and labels. See the various options by typing python CPU --help or python CPU -h. Typical usage: python CPU output/myspectrum.dat for a single spectrum. For using CPU you need to have on your machine a recent version of python and scientific python (scipy), as well as gnuplot.
- new precision file chi2pl10.pre for even faster (but less accurate) CMB calculation than with default settings.
- bug in dark energy fluid equations fixed on 16.06.11, thanks to Vid Irsic for pointing it out.
|
| v1.1 (16.05.2011) |
- slightly modified definition of three trigger parameters controlling
UFA and RSA approximations (refer to tau instead of tau_h). Changed precision files accordingly.
- corrected bug previously leading to segmentation fault when computing lensed temperature but not polarisation
|
| v1.0 (16.04.2011) |
|
Please report bugs, ask questions and send comments/suggestions at
support@class-code.net
|
|