Skip to main content

fiesta 🎉

fiesta: Fast Inference of Electromagnetic Signals and Transients with jAx

fiesta logo

NOTE: fiesta is currently under development. We have some basic documentation available under ./docs. Feel free to contact us for any questions.

Installation

fiesta can be installed from pip via

pip install fiestaEM

Alternatively you can install it directly from source by cloning

git clone git@github.com:nuclear-multimessenger-astronomy/fiestaEM.git

and then run

pip install -e .

in the cloning directory.

Note, that by default only the cpu version of jax is installed. If you want to use GPU acceleration, run

pip install fiestaEM[gpu]

or install jax[cuda12] as indicated on the jax webpage manually.

To obtain a set of recommended built-in surrogates (see below), additionally run

python -c "from fiesta.surrogates import download_recommended_surrogates; download_recommended_surrogates()"

Loading surrogate models

Surrogates can be loaded in the python shell as

from fiesta.inference.lightcurve_model import FluxModel

model = FluxModel(name=name, filters=filters, directory=directory)

This means you have to explicitely provide the directory argument that points to the .pkl files storing the neural network and surrogate metadata. However, if a surrogate is stored under src/fiesta/surrogates/KN or src/fiesta/surrogates/GRB, it can be loaded as a built-in surrogate without providing the directory argument explicitely. To see which surrogates are built-in and can simply be loaded without providing directory explicitely, you can run

python -c "from fiesta.surrogates import print_built_in_surrogates; print_built_in_surrogates()"

Initially, there are no built-in surrogates, unless you run the command mentioned above. You can also download additional models from the github main branch. For instance,

from fiesta.surrogates import download_surrogate
download_surrogate("pbag_tophat_CVAE")

will download the pbag_tophat_CVAE surrogate. To print a list of surrogates available for download, run

python -c "from fiesta.surrogates import print_downloadable_surrogates; print_downloadable_surrogates()"

Documentation

The documentation is available at https://nuclear-multimessenger-astronomy.github.io/fiestaEM/

Training surrogate models

To train your own surrogate models, have a look at some of the example scripts in the repository for inspiration. You can find them under ./surrogates/GRB/ and ./surrogates/KN/ in the respective model folders. The example section on training is currently work in progress.

Examples

The ./examples/training/ directory contains scripts that show how to use the fiesta API to train a flux density surrogate either with a CVAE architecture or with a simple feed-forward NN. Mock training data is provided as well, but note that the data set is reduced significantly and thus you will not be able to get a decent surrogate from it. If you want to use our training data, please contact us so we can figure out a way how to deliver the heavy files (> 10GB) to you. We also have example scripts for running an inference on AT2017gfo + GRB170817A. They can be found in ./examples/inference/. Note that for all of these example scripts it is highly recommended to use GPU-acceleration, since otherwise the runtime will rather long.

For Developers

Running tests

Install the package in editable mode and run the test suite with:

pip install -e .
python -m coverage run --source fiesta -m pytest tests/*.py

To run a single test file:

python -m pytest tests/test_models.py

Building the docs locally

Install the documentation dependencies:

pip install -e ".[docs]"

Then build the HTML docs from the docs/ directory:

sphinx-build docs docs/_build/html

Open the result in your browser:

open docs/_build/html/index.html   # macOS
xdg-open docs/_build/html/index.html  # Linux

For a live-reloading development server:

sphinx-autobuild docs docs/_build/html
# Visit http://127.0.0.1:8000

To check for broken references (mirrors the CI check):

sphinx-build -W --keep-going docs docs/_build/html

Citing fiesta

If you use fiesta in your research, please cite our paper:

@article{Koehn:2025zzb,
    author = "Koehn, Hauke and Wouters, Thibeau and Pang, Peter T. H. and Bulla, Mattia and Rose, Henrik and Wichern, Hannah and Dietrich, Tim",
    title = "{Efficient Bayesian analysis of kilonovae and gamma ray burst afterglows with FIESTA}",
    eprint = "2507.13807",
    archivePrefix = "arXiv",
    primaryClass = "astro-ph.HE",
    doi = "10.1051/0004-6361/202556626",
    journal = "Astron. Astrophys.",
    volume = "704",
    pages = "A55",
    year = "2025"
}

Acknowledgements

The logo was created by ideogram AI.

Download files

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

Source Distribution

fiestaem-0.2.1.tar.gz (115.1 kB view details)

Uploaded Source

Built Distribution

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

fiestaem-0.2.1-py3-none-any.whl (124.4 kB view details)

Uploaded Python 3

File details

Details for the file fiestaem-0.2.1.tar.gz.

File metadata

  • Download URL: fiestaem-0.2.1.tar.gz
  • Upload date:
  • Size: 115.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for fiestaem-0.2.1.tar.gz
Algorithm Hash digest
SHA256 8e510f4caeb0910c7fa0ddc731e4179852964a10545ce48cdfd1f1d23a0300b4
MD5 12c301e45ac43a838df4f9f97af7fc1d
BLAKE2b-256 cd021d47e08685bf53d67d873a21ba0f6f43a99d20dcbba755c1b680dcad9984

See more details on using hashes here.

File details

Details for the file fiestaem-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: fiestaem-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 124.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for fiestaem-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e88cf5ff6e16828e3932cb2c8ae3ed4d094f81359c94feb30e69cd1647f1c562
MD5 4b04f511e31defe75b486ff61342bcaf
BLAKE2b-256 b4b5e4ba864382ecfd244694d1c223dd33fbd8b6b6ff991a480e9d091168033b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.0

1 file

0.0.2

2 files

0.0.1

2 files

Supported by

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