Skip to main content
https://github.com/Lbalkenhol/candl/raw/main/docs/logos/candl_wordmark&symbol_col_RGB.png

CMB Analysis With A Differentiable Likelihood

Authors:

L. Balkenhol, C. Trendafilova, K. Benabed, S. Galli

Paper:

arxivshield

Source:

https://github.com/Lbalkenhol/candl

Documentation:

docsshield

candl is a differentiable likelihood framework for analysing CMB power spectrum measurements. Key features are:

  • JAX-compatibility, allowing for fast and easy computation of gradients and Hessians of the likelihoods.

  • The latest public data releases from the South Pole Telescope and Atacama Cosmology Telescope collaborations.

  • Interface tools for work with other popular cosmology software packages (e.g. Cobaya and MontePython).

  • Auxiliary tools for common analysis tasks (e.g. generation of mock data).

candl supports the analysis of primary CMB and lensing power spectrum data (\(TT\), \(TE\), \(EE\), \(BB\), \(\phi\phi\), \(\kappa\kappa\)).

Installation

candl can be installed with pip:

pip install candl-like

or alternatively you can clone and pip install . this repository.

Data Sets

candl data sets are kept separately from the code. There currently exist three online libraries with compatible data:

  • spt_candl_data: official repository of the South Pole Telescope collaboration.

  • candl_data: repository of CMB data sets re-implemented in candl.

  • clipy: 2018 Planck likelihoods available through a wrapper with the python, JAX-friendly clipy implementation.

Together these provide access to the following data:

Data set

Library

Papers

SPT-3G D1 T&E

spt_candl_data

Quan et al. 2025 (in prep.)

SPT-3G D1 BB

lite version: candl_data

Zebrowski et al. 2025

SPT-3G 2018 TT/TE/EE

candl_data

Dutcher et al. 2021

SPT-3G 2018 \(\phi\phi\)

candl_data

Pan et al. 2023

SPTpol BB

candl_data

Sayre et al. 2020

Planck 2018 likelihoods

clipy

Planck 2018 V

ACT DR6 TT/TE/EE

candl_data

Calabrese et al. 2025

ACT DR6 \(\phi\phi\)

candl_data

Qu et al. 2023

ACT DR4 TT/TE/EE

candl_data

Choi et al. 2020

Detailed, installation instructions for the data sets can be found on the dedicated repo pages, but in short, for the spt_candl_data and the candl_data libraries you navigate to where you would like to store the data and then run:

git clone https://github.com/SouthPoleTelescope/spt_candl_data.git
cd spt_candl_data
pip install .

or:

git clone https://github.com/Lbalkenhol/candl_data.git
cd candl_data
pip install .

Instructions on how you can add your own data sets can be found in the docs.

JAX

JAX is a Google-developed python library. In its own words: “JAX is Autograd and XLA, brought together for high-performance numerical computing.”

candl is written in a JAX-friendly way. That means JAX is optional and you can install and run candl without JAX and perform traditional inference tasks such as MCMC sampling with Cobaya. However, if JAX is installed, the likelihood is fully differentiable thanks to automatic differentiation and many functions are jitted for speed.

Packages and Versions

candl has been built on python 3.10. You may be able to get it running on 3.9, but this is not officially supported - run it at your own risk.

candl has been tested on JAX versions 0.5.1, 0.4.31, and 0.4.24.

Documentation

You can find the documentation here.

Citing candl

If you use candl please cite the release paper. Be sure to also cite the relevant papers for any samplers, theory codes, and data sets you use.


CNRS ERC NEUCosmoS IAP Sorbonne

Metadata

Release files for candl-like 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for candl-like 2.2.0
File Size Uploaded
candl_like-2.2.0.tar.gz 82.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for candl-like 2.2.0
File Interpreter ABI Platform
candl_like-2.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 170.0 kB

Release files / candl_like-2.2.0.tar.gz

Download URL candl_like-2.2.0.tar.gz
Size 82.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0b89e2bc713a764235f6c290962e313003b1c4af55ae86e9da0147bb7101ac4a
BLAKE2b-256 checksum
How to use checksums
a49591e4533d762d08bb62ca1f2e4f2c1984eec082587eaff828d0a903221bf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.17

Release files / candl_like-2.2.0-py3-none-any.whl

Download URL candl_like-2.2.0-py3-none-any.whl
Size 87.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c0372396e218f2e5a877b3f34cb57563e4eb9e4607b3726bbd0a333a762450b
BLAKE2b-256 checksum
How to use checksums
14d9cc8e2d982365836209e69deed45cad576ad4b752cf17ba596185db27d181
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.17

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.0

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page