🚀 cloelib is a flexible and efficient library designed to compute cosmological observables for the CLOE (Cosmology Likelihood for Observables in Euclid) project. It is built for seamless integration with Boltzmann solvers and JAX-based frameworks, enabling automatic differentiation and modularity for the next generation of cosmological analyses.
🛠️ Work in Progress – We welcome feedback from the Euclid community and beyond to refine and improve this library!
- ✨ Features
- 📂 Supported external codes
- 🚀 Installation
- 📊 Usage
- 🤝 Contributing
- 📜 License
- 🙏 Acknowledgements
🔹 Intuitive & User-Friendly – Generate Euclid-like observables (e.g., power spectra, window functions, and tracer statistics) in just 3 minutes!
🔹 Automatic Differentiation – Includes a toy-example with JAX for gradient-based computations.
🔹 Modular & Extensible –
- Easily interface with external Boltzmann solvers or emulators via Python
Protocolsfollowing the cosmology.API. - Core structure enables defining Background & Perturbation models, choosing observables via Tracer or SpectroPower protocols, and computing final summary statistics like angular power spectra or Legendre multipoles.
cloelib interfaces with the following external codes, each used by a specific internal module for its calculations:
| Background | Perturbations | SpectroPower |
|---|---|---|
| camb | camb | comet-emu |
| class | class | PBJ (not publicly available) |
| NA | HMCode2020emu | NA |
We do not provide installation support for PBJ and class.
To install cloelib source code, clone the repository and install it via pip:
pip install .You can also install (some) supported dependencies:
pip install .[camb,hmcode2020emu,comet-emu]Note: We do not offer installation support for PBJ and CLASS. For installation instructions, please refer to the official documentation of each package.
Explore the tutorials in the cloe-org/playground repository for examples on how to compute cosmological observables and other key quantities!
Please review the organization's general contribution guidelines and the specific guidelines for this repository in the CONTRIBUTING.md file. Once you're familiar with the guidelines, follow these steps:
1️⃣ Create a new branch:
git checkout -b feature/your-feature-name2️⃣ Implement your changes following project style guidelines.
3️⃣ Commit your modifications:
git commit -m "Add feature: [brief description]" 4️⃣ Push your branch:
git push origin feature/your-feature-name 5️⃣ Open a pull request and contribute to the project!
This project is licensed under the GNU LESSER GENERAL PUBLIC LICENSE – see the LICENSE file for details.
🔭 Inspired by the pioneering work of the Euclid Consortium and the jaxcosmo project.
👩💻🧑💻 Authored by M. Bonici, G. Cañas-Herrera, P. Carrilho, S. Casas, C. Moretti, and A. Pezzotta (listed in alphabetical order).
🎯 With technical advice from S. Farrens and N. Tessore.