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.6.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.6-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.6-cp314-cp314-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

pyccl-3.3.6-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.6-cp313-cp313-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pyccl-3.3.6-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.6-cp312-cp312-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pyccl-3.3.6-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.6-cp311-cp311-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pyccl-3.3.6-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.6-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.6.tar.gz.

File metadata

  • Download URL: pyccl-3.3.6.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.6.tar.gz
Algorithm Hash digest
SHA256 fd6c0181381eb57345ec9b56bdcf9300c9a31a42014aa9c8ced95f31ace16795
MD5 43802970ef15240b58c84f87ef45aba6
BLAKE2b-256 d576dc091056f1af48e6cb56d651dac6eb8494dd2515547d9543c0ce5365b873

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.6.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.6-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.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6fa4f7e0fe17a90aea9fb981c586143ee41a846b2192f415bb995522adf26194
MD5 ed8f9201741736b01d6e5e62856763f5
BLAKE2b-256 ee484eab47c2615543aa8d4d80e689659e35547824216e318aa0541ade69efff

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.6-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.6-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.6-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 439472a5bd43a1fd332aa65e036ea20005297310b3c18bdf5f851ebbbd64038c
MD5 429a920d91175bdca9dc105e6c25e1e3
BLAKE2b-256 99096e545e891bf522fdee099dc8049d42589372550171f26593c8cc4bffabcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.6-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.6-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.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4a943004beee16b72f4c1464008904127831b760f5c1906ea430f9bc92601380
MD5 f06591bb461ad8c05d67077aad74b70b
BLAKE2b-256 af86df2caee376a298ceee5afd13c348371a2537d47aea30e5316d8fc6277004

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.6-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.6-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f2221b1aeb88adae11168faeb798003893bdaec0a9c6c9e5385694aab52e5f25
MD5 60414627758436947680eca3f6e1d3f7
BLAKE2b-256 7d66c64c214e680539e9dfa8266af7749a474cdefa81a3753ff887a2dfb5a7d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.6-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.6-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.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b0077f51318c2f3112682d37febc75b4334152a8c8338dff19b484cdd25cf9a7
MD5 59c107297905aeeb870d3d805e840f33
BLAKE2b-256 86954183630d8e67133e5d066d388f3852580d4de8baa592506c28a80274e34c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.6-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.6-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 957d9699b8ceec596e0f54932c185e7d1e953486e1e7445261306e8a2aa40d98
MD5 c91c86f1d5471119dd599d478472063f
BLAKE2b-256 099a821afc748dadcd8f5bebda4b37ee9dab8f64c92b223e442d9898040714de

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.6-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.6-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.6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 570e8433a57d799512f2cae494894c1c55b3640b5c778d874e0daeab2f44dd22
MD5 3b747cbf4718cb9eb2a9cecf00b71fbe
BLAKE2b-256 7bbf4663f97a1660537173e8cca9b33a2e312b2b51357feeeffa62bfed8482f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.6-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.6-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5a5095e97e39e8ad7623a17a03bd0e09a8f5e9517934a9b52a700b7069426f78
MD5 48fdef1533137772957632b5b93dd44a
BLAKE2b-256 dd0b09e644ac2546e8f503b23da4512960be0ebb517c3bf7e96e6894258c5073

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.6-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.6-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.6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b203e7b45700f8923a3f0ff7f74601c5a94a962cd79c3ae17f972c09c59da1d6
MD5 edf77cf1a954559af66429d20151da62
BLAKE2b-256 e998eaafa1fc7c96710aaaeeaa5a68e4fc381bbe996d61cf3151aacd9463b5c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.6-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.6-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyccl-3.3.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 303b83737d27e62f42f184d2d70af1507a32ece83293d95d79032dec22086c9d
MD5 6c194434812ff85f89824972cca0db87
BLAKE2b-256 9bdb4b9ed7bf7a4b8de5b3479d3b2ec18ef95f247704461523b8e64a23caba24

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.6-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