picasso#

Painting intracluster gas on gravity-only simulations


picasso is a model that makes predictions for the thermodynamic properties of the gas in massive dark matter halos from gravity-only cosmological simulations. It combines an analytical model of gas properties as a function of gravitational potential with a neural network predicting the parameters of said model. It is released here as a Python package, combining an implementation of the gas model based on JAX and flax, and models that have been pre-trained to reproduce gas properties from hydrodynamic simulations.

Why use picasso?#

picasso presents a few advantages that make it particularly interesting to predict gas properties from gravity-only halos:

Robustness

By combining neural networks and physical models, picasso can make fast, accurate and precise predictions of intracluster gas thermodynamics.

JAX under the hood

Thanks to the use of JAX and flax in its numerical implementation, picasso can make predictions that can be compiled just-in-time, accelerated on GPU/TPU, and are automatically differentiable.

Flexibility

picasso models can be trained to make predictions from extensive data inputs (e.g., from the full N-body particle distribution of a dark matter halo) or from minimal information (e.g., a halo catalog with only halo mass and concentration).

Trained models

The picasso library includes pre-trained models that can reasily be used to make predictions from various inputs.


Installation#

picasso can be install via pip:

pip install picasso-cosmo[jax]

Alternatively, if you already have JAX and flax installed, you may use

pip install picasso-cosmo

The latter option will not install or upgrade any package relying on JAX, which can be useful to avoid messing up an existing install. To install JAX on your system, see JAX’s installation page.

Testing and benchmarking#

picasso uses uv to manage dependencies. To test your installation of picasso, you can install the tests dependency group and run pytest:

git clone git@github.com:fkeruzore/picasso.git
cd picasso
uv python install
uv sync --all-groups --all-extras
uv run pytest

Some of the test also include basic benchmarking of model predictions using pytest-benchmark:

uv run pytest --benchmark-enable

Learn more#


Citation#

If you use picasso for your research, please cite the picasso original paper:

@ARTICLE{2024OJAp....7E.116K,
       author = {{K{\'e}ruzor{\'e}}, Florian and {Bleem}, L.~E. and {Frontiere}, N. and {Krishnan}, N. and {Buehlmann}, M. and {Emberson}, J.~D. and {Habib}, S. and {Larsen}, P.},
        title = "{The picasso gas model: Painting intracluster gas on gravity-only simulations}",
      journal = {The Open Journal of Astrophysics},
     keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics},
         year = 2024,
        month = dec,
       volume = {7},
          eid = {116},
        pages = {116},
          doi = {10.33232/001c.127486},
archivePrefix = {arXiv},
       eprint = {2408.17445},
 primaryClass = {astro-ph.CO},

}


Indices and tables#