Skip to main content

Painting intracluster gas on gravity-only simulations

Project description

logo

Tests Documentation Status arXiv PyPI - Version

picasso

Painting intracluster gas on gravity-only simulations

picasso is a model that allows making 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.

Documentation

See also Kéruzoré et al. (2024).

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

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},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2024OJAp....7E.116K},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

picasso_cosmo-1.1.4.tar.gz (5.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

picasso_cosmo-1.1.4-py3-none-any.whl (99.0 kB view details)

Uploaded Python 3

File details

Details for the file picasso_cosmo-1.1.4.tar.gz.

File metadata

  • Download URL: picasso_cosmo-1.1.4.tar.gz
  • Upload date:
  • Size: 5.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for picasso_cosmo-1.1.4.tar.gz
Algorithm Hash digest
SHA256 c03818fc36f46037861a6b3d8c0438f7becc9501bc6dd36ef5279a27466b0768
MD5 23988cec0fd5eda290748b1a5c89ce1f
BLAKE2b-256 e6358badef16a9de281b539e2a761781246912049f26c3f959a257f144e6fa6c

See more details on using hashes here.

File details

Details for the file picasso_cosmo-1.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for picasso_cosmo-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2bcc51467e083ff4d798da12988575ddcbbca94dc24de7998dafe406ee20d0f6
MD5 0922e85769542ad07c0a8bb8acf1862a
BLAKE2b-256 ff8ea31d5342b31f6ec0482adcabfb867549fd071a4750ab716bfc745b5ec91f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page