CANDI

🍬 CANDI

Code for ANalysis of modified Distance-duality with cosmological Inference

Welcome to the CANDI code!

This repository provides a cosmological analysis code to place constraints from supernovae (SN), baryon acoustic oscillations (BAO), and gravitational waves (GW) through distance measurements.

It allows you to:


✨ What’s inside?

Here you can find:


⚙️ Installation

Requirements

⚡ Quickstart

# Clone the repository
git clone https://github.com/chiaradeleo1/CANDI.git
cd CANDI

# Install dependencies
pip install -r requirements.txt

📂 Data

The data are not included in this repository.

To reproduce the results in of (arXiv:2505.13613), you can simulate datasets and run chains using the package in Zenodo (https://doi.org/10.5281/zenodo.17043955).

The package contains a notebook to generate simulated data for:

The settings files to run the different scenarios discussed in the paper are provided in the settings/ folder and can be run using run_paper.py

How to run it?

Each run is controlled via a YAML settings file.

Key entries include:

Examples of YAML files can be found in the settings/ folder for different cosmological models, while interactive notebook examples are provided under the name DEMO_

🧩 Custom Cosmology

You can implement your own cosmological model by following
theory_code/expansion_models/example_custom_cosmology.py.

A valid cosmology must provide at least:

With this interface you can:

This makes it easy to go beyond ΛCDM and test custom scenarios with SN, BAO, and GW probes.

📜 Citation