-
Notifications
You must be signed in to change notification settings - Fork 30
Installation
For a detailed description of the installation process (and failure solving) see CLASS' wiki installation page.
> gcc-4.2
= python-2.7
cython
(for classy)
numpy
(for classy and the others python modules)
scipy
(for CPU.py)
matplotlib
(for CPU.py and test_class.py)
Note: For python dependencies, a "just works" solution is Anaconda.
In order to install hi_class we, first, must get a copy in your filesystem. Our recommended way is using git:
git clone https://github.com/miguelzuma/hi_class_public
This command will copy the git repository in our current working directory. Otherwise, we can download it from https://github.com/miguelzuma/hi_class_public/archive/hi_class.zip which we will have to uncompress (e.g. using unzip hi_class.zip
).
Now, we must change our working directory to the hi_class_public path:
cd hi_class_public
or, in case you used the zip file:
cd hi_class_public-hi_class
(this command assumes the uncompressed file are in our current working directory.
We can see the compilation options in the Makefile
. Some processors need explicit linking of some libraries to have a working classy. If this is our case, we have to edit python/setup.py
and change line 32 libraries=["class"],
to libraries=["class", "mvec", "m"],
. We are now ready to compile hi_class. Run
make
(or, for a faster compilation, make -j$(nproc)
, which will allow parallel compilation with as much jobs as processors our system has).
Home
Installation
Basic usage
classy: the python wrapper
Introducing new models
The code:
- Code 1: Philosophy and structure
- Code 2: Indexing
- Code 3: Errors
- Code 4: input.c
- Code 5: background.c
- Code 6: thermodynamics.c
- Code 7: perturbations.c
- Code 8: primordial.c
- Code 10: output.c
- Other modules
- classy: classy.pyx and classy.pxd
Examples: