https://github.com/cmbant/camb
Code for Anisotropies in the Microwave Background
https://github.com/cmbant/camb
21cm-signal cosmic-microwave-background cosmology gravitational-lensing large-scale-structure python-package
Last synced: 3 months ago
JSON representation
Code for Anisotropies in the Microwave Background
- Host: GitHub
- URL: https://github.com/cmbant/camb
- Owner: cmbant
- License: other
- Created: 2015-06-17T16:02:54.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-12-09T11:37:54.000Z (5 months ago)
- Last Synced: 2025-01-27T08:34:43.000Z (4 months ago)
- Topics: 21cm-signal, cosmic-microwave-background, cosmology, gravitational-lensing, large-scale-structure, python-package
- Language: Fortran
- Homepage: https://camb.info/
- Size: 112 MB
- Stars: 206
- Watchers: 21
- Forks: 156
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
===================
CAMB
===================
:CAMB: Code for Anisotropies in the Microwave Background
:Author: Antony Lewis and Anthony Challinor
:Homepage: https://camb.info/.. image:: https://img.shields.io/pypi/v/camb.svg?style=flat
:target: https://pypi.python.org/pypi/camb/
.. image:: https://img.shields.io/conda/vn/conda-forge/camb.svg
:target: https://anaconda.org/conda-forge/camb
.. image:: https://readthedocs.org/projects/camb/badge/?version=latest
:target: https://camb.readthedocs.io/en/latest
.. image:: https://github.com/cmbant/camb/actions/workflows/tests.yml/badge.svg?branch=master
:target: https://github.com/cmbant/CAMB/actions
.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/cmbant/CAMB/HEAD?filepath=docs%2FCAMBdemo.ipynbDescription and installation
=============================CAMB is a cosmology code for calculating cosmological observables, including
CMB, lensing, source count and 21cm angular power spectra, matter power spectra, transfer functions
and background evolution. The code is in Python, with numerical code implemented in fast modern Fortran.See the `CAMB python example notebook `_ for a
quick introduction to how to use the CAMB Python package.For a standard non-editable installation use::
pip install camb [--user]
The --user is optional and only required if you don't have write permission to your main python installation.
To install from source, clone from github using::git clone --recursive https://github.com/cmbant/CAMB
Then install using::
pip install -e ./CAMB [--user]
You will need gfortran 6 or higher installed to compile (usually included with gcc by default).
If you have gfortran installed, "python setup.py make" (and other standard setup commands) will build the Fortran
library on all systems (including Windows without directly using a Makefile).The python wrapper provides a module called "camb" documented in the Python `CAMB documentation `_.
After installation you can also run CAMB from the command line reading parameters from a .ini file, e.g.::
camb inifiles/planck_2018.ini
To compile the Fortran command-line code run "make camb" in the fortran directory. For full details
see the `ReadMe `_.Branches
=============================The master branch contains latest changes to the main release version.
There is a test suite, which runs automatically on GitHub actions for new commits and pull requests.
Reference results and test outputs are stored in the `test outputs repository `_. Tests can also be run locally.To reproduce legacy results, see these branches:
- *CAMB_sources* is the old public `CAMB Sources `_ code.
- *CAMB_v0* is the old Fortran-oriented (gfortran 4.8-compatible) version as used by the Planck 2018 analysis.
- *rayleigh* includes frequency-dependent Rayleigh scattering
- *python2* is the last Python 2 compatible version===================
.. raw:: html