Metadata-Version: 2.4
Name: fiestaEM
Version: 0.1.0
Summary: Fast inference of electromagnetic signals with JAX
Author-email: Thibeau Wouters <thibeauwouters@gmail.com>, Hauke Koehn <hauke.koehn@uni-potsdam.de>
License-Expression: MIT
Project-URL: Homepage, https://github.com/nuclear-multimessenger-astronomy/fiestaEM
Keywords: sampling,inference,astrophysics,kilonovae,gamma-ray bursts,afterglow,surrogates
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dill
Requires-Dist: jax
Requires-Dist: jaxlib
Requires-Dist: flax
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: jaxtyping
Requires-Dist: beartype
Requires-Dist: tqdm
Requires-Dist: scipy
Requires-Dist: ml_collections
Requires-Dist: matplotlib
Requires-Dist: astropy
Requires-Dist: sncosmo
Requires-Dist: flowMC
Requires-Dist: h5py
Requires-Dist: corner
Provides-Extra: grb
Requires-Dist: afterglowpy; extra == "grb"
Provides-Extra: gpu
Requires-Dist: jax[cuda12]; extra == "gpu"
Dynamic: license-file

# fiesta 🎉

`fiesta`: **F**ast **I**nference of **E**lectromagnetic **S**ignals and **T**ransients with j**A**x

![fiesta logo](docs/fiesta_logo.jpeg)

**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 fiesta
```

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 fiesta[gpu]
```
or install `jax[cuda12]` as indicated on the [`jax` webpage](https://docs.jax.dev/en/latest/installation.html#installation) manually.

Also, due to the file size limit on pypi, the pypi distribution only contains a reduced amount of built-in surrogates. If you want all built-in surrogates, we recommend *editable* installation from source or to download the `.pkl` files manually and store them in the `surrogates` folder of the site-package.
You can check which built-in surrogates are available by running 
```
python -c "from fiesta.inference.lightcurve_model import list_built_in_surrogates; list_built_in_surrogates()"
```


## 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

We have example scripts for running an inference on AT2017gfo + GRB170817A. They can be found in `./examples/inference/`. We also plan to add an example section on training surrogates in the future.

## Acknowledgements

The logo was created by [ideogram AI](https://ideogram.ai/). 
