Git Product home page Git Product logo

camb's Introduction

CAMB

CAMB

Code for Anisotropies in the Microwave Background

Author

Antony Lewis and Anthony Challinor

Homepage

https://camb.info/

image

image

image

image

image

Description 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 in the project source root directory use:

python setup.py install [--user]

If you want to work on the code, you can also just install in place without copying anything using:

pip install -e . [--user]

You will need gfortran 6 or higher installed to compile. Binary files for Windows are also provided, so these are used instead if no gfortran installation is found on Windows machines. 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.

The devel branch contains latest less-stable things in development. The master and devel branches have an integrated test suite, which runs automatically on Travis 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

camb's People

Contributors

cmbant avatar vehre avatar alexander-mead avatar jesustorrado avatar zefon avatar marius311 avatar sbird avatar mraveri avatar tilmantroester avatar ckreisch avatar fabrez avatar h3jia avatar beckermr avatar joezuntz avatar lcasarini avatar nanoomlee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.