Metadata-Version: 2.4
Name: AletheiaCosmo
Version: 0.1.0
Summary: An emulator of the non-linear matter power spectrum based on the evolution mapping approach.
Author-email: "Ariel G. Sanchez" <arielsan@mpe.mpg.de>
License: MIT License
        
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://gitlab.mpcdf.mpg.de/arielsan/aletheia
Project-URL: Bug Tracker, https://gitlab.mpcdf.mpg.de/arielsan/aletheia/-/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Intended Audience :: Science/Research
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: camb
Requires-Dist: scikit-learn~=1.7.2
Requires-Dist: appdirs
Requires-Dist: skops
Dynamic: license-file

# Aletheia

| | |
| :--- | :--- |
| **Author** | Ariel Sánchez and The Aletheia Team |
| **Contributors** | Ariel Sánchez, Andres Ruiz, Facundo Rodriguez, Carlos Correa, Andrea Fiorilli, Matteo Esposito, Jenny Gonzalez Jara, Nelson D. Padilla|
| **Source** | [Source code at GitLab](https://gitlab.mpcdf.mpg.de/arielsan/aletheia) |
| **Documentation** | [Documentation at MPCDF Pages](https://aletheia-46606f.pages.mpcdf.de/) |
| **Installation** | `pip install AletheiaCosmo` |
| **Reference** | Sánchez et al. (2025, *in prep*) |

---

**Aletheia** is an accurate and robust Python package that provides emulated predictions for the non-linear matter power spectrum.

At its core, **Aletheia** is based on the **evolution mapping** framework, which provides a high degree of flexibility and allows the emulator to cover a wide cosmology parameter space at continuous redshifts up to $z \approx 4$.

*Aletheia* (Ἀλήθεια), in ancient Greek, means *truth* or *unconcealment*. In mythology, she was the personification of Truth.

## Emulated Parameters

The current release of `Aletheia` is trained on the following key parameters (for more details, see the [full documentation](https://aletheia-46606f.pages.mpcdf.de/emulator_parameters.html)):

| Parameter | Description |
| :--- | :--- |
| $\omega_b$ | Physical baryon density parameter |
| $\omega_c$ | Physical cold dark matter density parameter|
| $n_s$ | Primordial scalar spectral index |
| $\sigma_{12}$ | RMS of matter fluctuations at $R=12\,{\rm Mpc}$ |

The emulator is trained on shape parameters spanning $\pm 5\sigma$ of Planck 2018 constraints and a wide clustering range of $0.2 < \sigma_{12} < 1.0$.

It also robustly handles variations in dark energy through the evolution mapping technique, allowing for inputs of $A_{\rm{s}}$, $w_0$, $w_a$, $\omega_{\rm DE}$ and $\omega_k$.

## Getting Started

You can install the latest stable release of the code directly from PyPI:

```bash
pip install AletheiaCosmo
```

Once installed, you can follow the [Jupyter Notebook tutorial](https://gitlab.mpcdf.mpg.de/arielsan/aletheia/-/blob/main/examples/demo.ipynb) or the [Quick Start Guide](https://aletheia-46606f.pages.mpcdf.de/quick_start.html) for an example of how to make predictions.

A minimal example is as simple as:

```python
import numpy as np
from aletheiacosmo import AletheiaEmu

# 1. Define cosmology using the built-in helper
cosmo_params = AletheiaEmu.create_cosmo_dict(
    h=0.67,
    omega_b=0.0224,
    omega_c=0.120,
    n_s=0.96,
    A_s=2.1e-9,
    model='LCDM'
)

# 2. Initialize the emulator
emu = AletheiaEmu()

# 3. Get the non-linear P(k) at z=1.0
# Scales to be considered, in 1/Mpc
k = np.logspace(-2, 0.3, 100)
z = 1.0
# Return the non-linear power spectrum in units of Mpc^3
p_nonlinear = emu.get_pnl(k, cosmo_params, z)
```

## Developer Version

If you wish to modify the code or contribute to development, you can install the developer version:

```bash
# Clone the repository
git clone [https://gitlab.mpcdf.mpg.de/arielsan/aletheia.git](https://gitlab.mpcdf.mpg.de/arielsan/aletheia.git)
cd aletheia

# Install in editable mode
pip install -e .
```

## License

This package is made publicly available under the [MIT License](LICENSE).

## Project Status

`Aletheia` is under active development. Follow the public repository at <https://gitlab.mpcdf.mpg.de/arielsan/aletheia> to ensure you are always up-to-date with the latest release.

