Skip to main content

CCL

Build  Coverage  Documentation  DOI

The Core Cosmology Library (CCL) is a public standardized library of routines to calculate basic observables used in cosmology. It will be the standard theoretical prediction package used by the LSST Dark Energy Science Collaboration (DESC), although we hope it will have broader applicability.

The core functions of this package include:

  • Background quantities (Hubble parameter $H(z)$, distances etc.).
  • Linear growth factor $D(z)$ and growth rate $f(z)$.
  • Linear matter power spectra $P(k)$ from Boltzmann codes (CLASS, CAMB), emulators, and approximate fitting functions.
  • Non-linear matter power power spectra using a variety of prescriptions, including emulators, and including the impact of baryonic effects.
  • Angular power spectra $C_\ell$ and correlation functions $\xi(\theta)$ for arbitrary combinations of tracers including number counts, shear, CMB lensing, ISW, thermal SZ, CIB, as well as custom-made tracers.
  • A comprehensive halo model framework able to combine different prescriptions for the halo mass function $dn/dM$, halo bias $b(M)$, concentration-mass relation $c(M)$, mass definitions, and halo profiles, as well as to provide predictions for summary statistics (power spectra, non-Gaussian covariances) of arbitrary quantities.
  • Support for $\Lambda$ CDM, and $w_0-w_a$CDM cosmologies with curvature and massive neutrinos, as well as simple modified gravity extensions (e.g. $\mu-\Sigma$ ).

This software is a publicly released LSST DESC product which was developed within the LSST DESC using LSST DESC resources. DESC users should use it in accordance with the LSST DESC publication policy. External users are welcome to use the code outside DESC in accordance with the licensing information below.

The list of publicly released versions of this package can be found here. The master branch is the most recent (non-released) stable branch, but under development. We recommend using one of the public releases unless working on the development on the library.

See the documentation for more details and installation instructions. We also have a comprehensive list of example computations CCL can do in the CCLX github repo.

TLDR

CCL is available as a Python package through PyPi or conda. To install, simply run:

$ conda install -c conda-forge pyccl

or

$ pip install pyccl

For the PyPi installation, you will need CMake and SWIG installed locally. See Getting CMake and Installing SWIG for instructions. Note that the code only supports Linux or Mac OS, but no Windows.

Once you have the code installed, you can take it for a spin!

import pyccl as ccl
import numpy as np

# Create new Cosmology object with a given set of parameters. This keeps track
# of previously-computed cosmological functions
cosmo = ccl.Cosmology(
    Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0.8, n_s=0.96,
    transfer_function='bbks')

# Define a simple binned galaxy number density curve as a function of redshift
z_n = np.linspace(0., 1., 500)
n = np.ones(z_n.shape)

# Create objects to represent tracers of the weak lensing signal with this
# number density (with has_intrinsic_alignment=False)
lens1 = ccl.WeakLensingTracer(cosmo, dndz=(z_n, n))
lens2 = ccl.WeakLensingTracer(cosmo, dndz=(z_n, n))

# Calculate the angular cross-spectrum of the two tracers as a function of ell
ell = np.arange(2, 10)
cls = cosmo.angular_cl(lens1, lens2, ell)
print(cls)

License, Credits, Feedback etc

This code has been released by DESC, although it is still under active development. It is accompanied by a journal paper that describes the development and validation of CCL, which you can find on the arxiv:1812.05995. If you make use of the ideas or software here, please cite that paper and provide a link to this repository: https://github.com/LSSTDESC/CCL. You are welcome to re-use the code, which is open source and available under terms consistent with our LICENSE (BSD 3-Clause).

External contributors and DESC members wishing to use CCL for non-DESC projects should consult with the TJP working group conveners, ideally before the work has started, but definitely before any publication or posting of the work to the arXiv.

For free use of the CLASS library, the CLASS developers require that the CLASS paper be cited: CLASS II: Approximation schemes, D. Blas, J. Lesgourgues, T. Tram, arXiv:1104.2933, JCAP 1107 (2011) 034. The CLASS repository can be found in http://class-code.net.

The CAMB developers have released CAMB under the LGPL license with a few additional restrictions. Please read their LICENSE for more information.

Contact

If you have comments, questions, or feedback, please write us an issue.

The current leads of the LSST DESC CCL Topical Team are Carlos Garcia-Garcia and Sandro Vitenti.

Acknowledgements

The DESC acknowledges ongoing support from the Institut National de Physique Nucleaire et de Physique des Particules in France; the Science & Technology Facilities Council in the United Kingdom; and the Department of Energy, the National Science Foundation, and the LSST Corporation in the United States. DESC uses resources of the IN2P3 Computing Center (CC-IN2P3--Lyon/Villeurbanne - France) funded by the Centre National de la Recherche Scientifique; the National Energy Research Scientific Computing Center, a DOE Office of Science User Facility supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231; STFC DiRAC HPC Facilities, funded by UK BIS National E-infrastructure capital grants; and the UK particle physics grid, supported by the GridPP Collaboration. This work was performed in part under DOE Contract DE-AC02-76SF00515.

NEC acknowledges support from a Royal Astronomical Society research fellowship and the Delta ITP consortium, a program of the Netherlands Organisation for Scientific Research (NWO) that is funded by the Dutch Ministry of Education, Culture and Science (OCW). DA acknowledges support from the Science and Technology Facilities Council through an Ernest Rutherford Fellowship, grant reference ST/P004474. AL and CG acknowledge support from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement No. [616170] for work on the generic interface for theory inputs.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyccl-3.3.5.tar.gz (16.8 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyccl-3.3.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pyccl-3.3.5-cp314-cp314-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

pyccl-3.3.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pyccl-3.3.5-cp313-cp313-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pyccl-3.3.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pyccl-3.3.5-cp312-cp312-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pyccl-3.3.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pyccl-3.3.5-cp311-cp311-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pyccl-3.3.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pyccl-3.3.5-cp310-cp310-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file pyccl-3.3.5.tar.gz.

File metadata

  • Download URL: pyccl-3.3.5.tar.gz
  • Upload date:
  • Size: 16.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyccl-3.3.5.tar.gz
Algorithm Hash digest
SHA256 a26711e3b476f8ea1129be1c79eff0f3dbc98db105652fd47eb5a43162119b13
MD5 ba406290b9f0a8312b4e0aace335010f
BLAKE2b-256 d22bca03c803585fd8eda351cd32ba316cdb7b37d1aa47aa642f267f547e227c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.5.tar.gz:

Publisher: publish.yml on LSSTDESC/CCL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyccl-3.3.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d6a71447a185fdfc791e2776f4997b006f70af8bd3d2f622df3337f83fcbf7de
MD5 052075c83c259150f3c4932b5709ba18
BLAKE2b-256 9ea4e3f1b0414c4a79102b9837be37702d653c742dcd71562a791efe3ed0f465

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on LSSTDESC/CCL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyccl-3.3.5-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.5-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 59cf075dc6ea488072722c3c421e63fcdfcceb90ff416097f078cd6951a2f144
MD5 451aae15f497b0de60008096cd913745
BLAKE2b-256 618d66619240a05d23fd52110a002147c1d2f917a6e5b8d577858c44ec2979bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.5-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: publish.yml on LSSTDESC/CCL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyccl-3.3.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ceca30649fb6417500ca262b358840fdd2be58eff68b9b97ade2998b96b072a0
MD5 c3f8f8876a11faf8a0e0e764eb10427f
BLAKE2b-256 701cbebf35ec44934254c1c422539ca913b7fec6e6ad10ea44e78b2ab502f188

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on LSSTDESC/CCL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyccl-3.3.5-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7a66a8cb60b8967110b2acf7b5a50dff43d652bbae160863e94c7c7b5e9105d5
MD5 ebfe3d2e616379b9ba059d1ce40069dc
BLAKE2b-256 ffde1f8c33254717c9bc33d14628fe2ca37381fc7415facfe9b19671b17bc73d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.5-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on LSSTDESC/CCL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyccl-3.3.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a6ec68e9b7c6f9de4ba07298ca133f1b6c3b5ade50e60fb2f5d18cd2591a7c43
MD5 bf21b0eb113044ad47bbd31f20623f74
BLAKE2b-256 d0b7f4cb1279e92af4fa1da4655231eb8cd4a7ceb0b0537e3154da99615a6aa8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on LSSTDESC/CCL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyccl-3.3.5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 720fbc27ef001e6bfe619670ad444685c683d6d19bbe50053dfbfc3995d9948a
MD5 eb054fcfdb813c15a25a342705a57fdb
BLAKE2b-256 6ec886b2d874d828bbcf42217d5396beca3b80c68e85f3b1959cf768c6fc5b09

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.5-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on LSSTDESC/CCL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyccl-3.3.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 650aea1fe7c4f05686a2d59c77f0d4d9b5c71692ae999269830822ccf4d8ec32
MD5 2d1ac57ec2451c8d1c9fc473f1e655c9
BLAKE2b-256 39f50fbe506c1e0f0e1cfded03286bf1d464fa2a0eabac9142588e2e1f9fd512

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on LSSTDESC/CCL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyccl-3.3.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dcd52d9fcd4ae431ae201d37757121a546086ee5d69b374d0425e6aa643e742f
MD5 fcda8c5ed51797e397fc731691e2c25b
BLAKE2b-256 053cdb4de10b588d3bf966d4add2c4367f0a5a28d52fe95ef7f2b9f5e732569e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.5-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on LSSTDESC/CCL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyccl-3.3.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fe0e9f3cc4e3bff1b7bc979ab0620b4ae9009eda9d3f8df12d32cbd1779d3c05
MD5 35624074c744a4c58b68aba9ae453788
BLAKE2b-256 89dda81845e8ed817c6f92afaf55928301267717bfb58c2a974ccacee44fd9b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on LSSTDESC/CCL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyccl-3.3.5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 51cd4c5912ad3c84cef4d727e89fe2d4d5d599225f76506772009f6ab8038dd7
MD5 6f1167265f1be48c3a976a075be0e2f9
BLAKE2b-256 7dcf8d6a96a366594c3cb4e718eb348fdb077be97ce7fabf8a63df926c06cdb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.5-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on LSSTDESC/CCL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page