Metadata-Version: 2.4
Name: cosmopyro
Version: 0.0.1b2
Summary: NumPyro for gravitational-wave cosmology.
Author-email: Konstantin Leyde <Konstantin.Leyde@gmail.com>, Elena Colangeli <elena.colangeli@port.ac.uk>
License-Expression: MIT
Project-URL: Homepage, https://github.com/konstantinleyde/cosmopyro
Keywords: hamiltonian monte-carlo,cosmology,gravitational waves
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: arviz>=0.22.0
Requires-Dist: blackjax>=1.3
Requires-Dist: corner>=2.2.3
Requires-Dist: equinox>=0.13.6
Requires-Dist: h5py>=3.14.0
Requires-Dist: healpy>=1.18.1
Requires-Dist: ipython>=9.6.0
Requires-Dist: jax>=0.5.3
Requires-Dist: matplotlib>=3.10.7
Requires-Dist: numpy>=2.3.5
Requires-Dist: numpyro>=0.19.0
Requires-Dist: optax>=0.2.6
Requires-Dist: pandas>=2.3.3
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: rich>=13.0
Provides-Extra: test
Requires-Dist: pytest>=8.4.2; extra == "test"
Provides-Extra: cosmology
Requires-Dist: astropy>=7.1.0; extra == "cosmology"
Provides-Extra: lvk
Requires-Dist: astropy>=7.1.0; extra == "lvk"
Requires-Dist: bilby>=2.8.0; extra == "lvk"
Provides-Extra: modified-gravity
Requires-Dist: quadax; extra == "modified-gravity"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: furo; extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"
Requires-Dist: sphinx-design; extra == "docs"
Dynamic: license-file

<div align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/KonstantinLeyde/CosmoPyro/refs/heads/main/images/CosmoPyro_dark.png">
    <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/KonstantinLeyde/CosmoPyro/refs/heads/main/images/CosmoPyro_light.png">
    <!-- PyPI strips <source> elements, so this fallback is what renders there. -->
    <img alt="CosmoPyro logo" src="https://raw.githubusercontent.com/KonstantinLeyde/CosmoPyro/refs/heads/main/images/CosmoPyro_light.png" width="280">
  </picture>
</div>

# **CosmoPyro**

CosmoPyro is a Bayesian framework for reconstructing the gravitational-wave population of compact binary coalescences using Hamiltonian Monte Carlo (HMC), and more specifically the No-U-Turn sampler implemented in [NumPyro](https://num.pyro.ai/en/stable/).

## Installation Instructions

### Installation from PyPI

If you want to install CosmoPyro as quickly as possible, you can use 

```bash
uv venv --python 3.11
source .venv/bin/activate
uv pip install cosmopyro
```
Alternatively, if you want to modify the code locally, you can install the code via cloning the git repository. 

### Basic installation from git

To create a new environment and install **CosmoPyro**, follow these steps. We would recommend installing `uv`, since it is significantly faster at resolving dependencies, but otherwise, you can also rely on `pip` alone. 

```bash
python -m venv .venv
source .venv/bin/activate
git clone git@github.com:KonstantinLeyde/CosmoPyro.git
cd CosmoPyro
uv pip install -e .
```

### Making the Environment GPU Compatible
To run on GPUs, you'll need the GPU version of `jax` matching your cluster's CUDA version:

```bash
pip install --upgrade --force-reinstall "jax[cuda12]"
```

## Running

For examples, see either this dedicated [git repository](https://github.com/KonstantinLeyde/CosmoPyro-Demo) or navigate to the [examples folder](examples), and follow the readme there. notebooks in the examples folder.

## Citation

If you use this software, please cite:

[TO WRITE](https://arxiv.org/pdf/??)

```bibtex
@article{
    TOCOLLATE
}
```

## Contact

If you have any questions, feedback, or would like to discuss new projects, please don't hesitate to reach out:

Email: Konstantin.Leyde@gmail.com
