Metadata-Version: 2.4
Name: pelycan
Version: 0.1.0
Summary: PEculiar veLocitY for Cosmological ANalysis: A modular Python toolkit to model, analyze, and compare pairwise velocities and dispersions.
Author-email: Mariana Jaber <mariana.jaber@ncbj.gov.pl>, Antonela Taverna <maria.taverna@ncbj.gov.pl>, Rasmus Strid <rasmus.strid@ncbj.gov.pl>
License-Expression: MIT
Project-URL: Homepage, https://github.com/PAIRSteam/pelycan
Project-URL: Repository, https://github.com/PAIRSteam/pelycan
Project-URL: Issues, https://github.com/PAIRSteam/pelycan/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy>=1.4
Requires-Dist: mpi4py>=3.0.0
Requires-Dist: camb
Requires-Dist: cobaya
Requires-Dist: emcee
Requires-Dist: getdist
Requires-Dist: corner
Requires-Dist: astropy
Requires-Dist: pandas
Requires-Dist: matplotlib
Dynamic: license-file

# PELYCAN

### **PE**culiar ve**L**ocit**Y** for **C**osmological **AN**alysis

![logo](assets/logo.jpg)

**A modular Python toolkit to model, analyze, and compare pairwise velocities and dispersions.**

Developed by the [PAIRS team](https://github.com/PAIRSteam)

pelycan implements one scientific pipeline end-to-end:

  Input: cosmological parameters (h, Ωc h², lnAₛ) + N-body simulation data v₁₂(r)

  Output: posterior constraints on those parameters

  The physics chain, implemented in pelycan/model/:
  CAMB → P(k) → ξ(r) → ξ̄(r) → ∂ξ̄/∂a → v₁₂(r) = −H(a)·a²·r·∂ξ̄/∂a / [3·(1+ξ)]
  The theoretical v₁₂(r) is compared to simulation measurements via a Gaussian likelihood (diagonal errors or full covariance matrix). Two samplers run this: emcee for single-parameter chi² spot checks, Cobaya for production joint inference with MPI.
  

## Features

- Predict mean pairwise velocity $v_{12}(r,a)$ and dispersion (coming soon!)
- Compare theoretical predictions to simulations
- Run parameter inference using [Cobaya](https://cobaya.readthedocs.io/en/latest/index.html)



## Project Structure

```text
pelycan/
|
├─ pelycan/
│  └─ model            # Core model code
|
├─ main/
│  └─ run_pelycan.py   # Quickstart script to run the model
|
├─ tests/              # Unit tests
|
└─ data/               # Post-processed data containing v12, sigma12 and errors
```



##  Installation (work in progress)

Currently, **pelycan** can be installed directly from source.

<!--
### From PyPI (recommended)
```bash
pip install pelycan
```
-->

### Standard installation from source:
Clone the repository and install with pip:

```bash
git clone https://github.com/PAIRSteam/pelycan.git
cd pelycan
pip install .
```
### Development installation
To modify or contribute to the code, install in editable mode:
```bash
git clone https://github.com/PAIRSteam/pelycan.git
cd pelycan
pip install -e .
```



## Running the Code (work in progress)

Quickstart: run the model for one cosmology/redshift and plot v₁₂(r), no simulation
data needed (run from the repo root):

```bash
python main/run_pelycan.py
```

For a full walkthrough (loading simulation data, comparing linear vs. non-linear vs.
quasi-linear variants), see [`main/tutorial.ipynb`](main/tutorial.ipynb).

## Tests (in progress)

```bash
pip install pytest
pytest tests/
```

##  Contributing

Please:

* Use feature branches for development
* Write clear commit messages and PRs
* Open issues for bugs, questions, or ideas

## Citation

If you use this code, please cite the papers:

* Jaber M., Hellwing W.~A., Garcia-Farieta J.~E., Gupta S., Bilicki M., 2024, PhRvD, 109, 123528. doi:10.1103/PhysRevD.109.123528
* ...

## Authors (under construction)

* Mariana Jaber, [Github mjaber](https://github.com/MarianaJBr), [INSPIRE Profile][inspire-mjaber]
* Antonela Taverna, [Github antotaverna](https://github.com/antotaverna), [ORCID Profile][orcid-antotaverna]
* Rasmus Strid, [Github R-Strid](https://github.com/R-Strid)


<!-- Links -->

[miniconda-site]: https://docs.conda.io/en/latest/miniconda.html

[conda-guide]: https://docs.conda.io/projects/conda/en/latest/user-guide/index.html

[poetry-url]: https://python-poetry.org/

[pypi-url]: https://pypi.org/

[conda-forge-url]: https://conda-forge.org/

[repo-url]: https://github.com/oarodriguez/cosmostat

[cobayay-url]: https://cobaya.readthedocs.io/en/latest/index.html

[gh-mjaber]: https://github.com/MarianaJBr

[inspire-mjaber]: https://inspirehep.net/authors/1707914

[gh-antotaverna]: https://github.com/antotaverna

[orcid-antotaverna]: https://orcid.org/0000-0003-1864-005X


