Skip to main content

Library of validated cosmological functions.

Project description

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.

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.

Project details


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

Uploaded CPython 3.14macOS 11.0+ ARM64

pyccl-3.3.4-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.4-cp313-cp313-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pyccl-3.3.4-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.4-cp312-cp312-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pyccl-3.3.4-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.4-cp311-cp311-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pyccl-3.3.4-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.4-cp310-cp310-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for pyccl-3.3.4.tar.gz
Algorithm Hash digest
SHA256 a9d22557354fd161df909e8f4f199e4f1c434c080fd6cddb2246609ddbd70e7c
MD5 851418f400a1aa9a29fc3785463a82d5
BLAKE2b-256 5740ff357d61a20c21420f1fe7417ca6d889be2e07a67b3564775aeaf6c3f366

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.4.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.4-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.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 601b687b50b506f7f5775475d79fa55d221616a827a96ad5d6d68bf7a15de9b9
MD5 239fa261d0050a681370c557559b4577
BLAKE2b-256 e566803e8196149d8d8a75319b4f20268210b1e1b31b3158a1143ce99cacf953

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyccl-3.3.4-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4ef4947138a6b2abf735b7d68b186027e877a989a7a230ff17f665f504b5165a
MD5 2a2c0b2317fdaa96ddc013ad47ebe69f
BLAKE2b-256 89faef14d21765eb19b53e72284399822a3ccd806e1f45370614cbd6d2f99973

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.4-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.4-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.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 685d528a096251a2eb5d569e611b5a2e68cc3a4a0134734b16ac4e73a07e7f27
MD5 ad4f5c754a8d7e1240f793641ff25c61
BLAKE2b-256 1a913000c5fc1ee8379636dc894946a3633baae74a3f1cce3c2d402e8991a0b5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyccl-3.3.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd6cf0317dc41fe6b3d6badd323994be1628a306ca84f2c39399a7ea9d64199b
MD5 5043e858aca465b741affdc68b57aaa2
BLAKE2b-256 877b0e1f7130e746f55c41116afc8ff69776bdb6c3a93eac285a4c0ce02ac57a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.4-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.4-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.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0229c863acea5c3fc6748dc7c40611dd529709c9d26e3679ebdbc467511ef993
MD5 7dd967a0bdede07366659a8b8acef45c
BLAKE2b-256 b7801db2504f21eec9b481e1fe298b05deb96e108d06ddb1828494d16d32bf1c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyccl-3.3.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a4e130f702cdd881f8ffab0eec337de839cb9bde14b440db551bc5198f03da86
MD5 b5439b25b93a05bbe79d7d811d7ecdbe
BLAKE2b-256 c4c068e09fbe696155726929a2f162e624af74ca30951a679b1e2609930d4ca8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.4-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.4-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.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f56ec404a6959f672fd7b16590bfdf9dac758710cac3fd6938b4032b62bc23bd
MD5 bacb4ef244ef0a91dac30c7afd2b2500
BLAKE2b-256 36e68c929551fa14333207537da5f40863b9b7b10e91abdd494d77220e367ff3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyccl-3.3.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 19bc76f9d20009a1fa51d0bc4705f1050d474946ceb463f480bee2af40028dc6
MD5 96f31b6e7cbd1ab98438e9c94b52ea9f
BLAKE2b-256 972399978d5134313b1bb49bc5ca7580f6bc1f72e8ccacf7edf47f4afb99cd26

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyccl-3.3.4-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.4-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.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c4c5a854fd99fb21a09f2d26a331b45bcc8973d716eb47707da4d28def3cacc7
MD5 4cc1c23b2897326278282dc80b8ebc6d
BLAKE2b-256 c26b91f697ccdebb4e6d6960f1d170edc0c13f9b11a9e486761f9abf19843d6d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyccl-3.3.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0e7f63dccf78f39c427e420521aad710b7c4d52671fa55f1fef1b385a8a50504
MD5 7be4e6fdfa1b52e8fbe10ca70020da10
BLAKE2b-256 60d64fa964c31d7981f779053b9c3d26936596cca6b74b18e040ffa497f074c0

See more details on using hashes here.

Provenance

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