Developed a Python package that does Inference of Lyman-alpha equivalent widths conditioned on galaxy properties You can check out the repo here.
Lyra is a Python package for fast, accurate Bayesian inference of galaxy physical properties using simulation-based inference (SBI). Trained on over 11 million simulated galaxies, Lyra enables users to perform high-fidelity posterior inference without the computational cost of traditional likelihood-based methods. The package is designed to be lightweight, reproducible, and easy to integrate into existing analysis pipelines.
The primary goal of Lyra is to democratize state-of-the-art Bayesian inference for large astronomical datasets. By leveraging SBI, Lyra provides robust posterior estimates of Lyman-alpha EW at scale, making precise inference feasible even for surveys containing tens to hundreds of thousands of objects.
Lyra uses neural density estimation techniques from the sbi framework to learn the conditional
distribution of galaxy physical parameters given observable features. The model is trained on a massive suite of
galaxies that span a wide range of astrophysical conditions, ensuring strong generalization across
parameter space.
Once trained, inference reduces to a forward pass through the neural network, allowing posterior sampling to be performed orders of magnitude faster than traditional MCMC or nested sampling approaches. The trained models are distributed with the package and can be accessed locally after installation.
Lyra achieves accurate and well-calibrated posterior estimates across a broad range of galaxy properties, demonstrating that simulation-based inference can match — and in many cases outperform — classical inference techniques while reducing computational cost by several orders of magnitude. Lyra hosts different models models conditioned on different groups of galaxy properties so that it is highly flexible to anyone's dataset.
These results highlight the power of simulation-based inference for modern astronomical surveys, where dataset sizes increasingly exceed the limits of traditional Bayesian workflows. By learning the inference problem directly from the galaxies, Lyra bypasses explicit likelihood construction while retaining full posterior information.
The scale of the training data (over 11 million galaxies) enables Lyra to capture complex, non-linear relationships between observables and physical parameters, resulting in stable and physically meaningful posteriors even in low signal-to-noise regimes.
Lyra is well-suited for large survey analyses, including population studies, and exploratory inference where fast posterior evaluation is critical. The big goal of Lyra is to be used for reionization based studies where the astronomical community can use this tool to infer the Lyman-alpha equivalent width distribution on a per galaxy basis tied to their galaxy properties. This can be used to then infer what the IGM evolution is and thuse infer what the neutral Hydrogen content is. The package is designed to integrate seamlessly with existing Python-based astronomy workflows.
Future development will focus on expanding the range of supported galaxy models, add in more functionality into the code so that anyone can perform their own training. Another avenue for exploration can be to provide the community with the training and testing data so thay the community can use this in addition to their data for further training and inference.
Lyra is actively developed as an open and extensible tool. Users can install the package locally via pip,
access pre-trained models, and incorporate Lyra into their own analysis pipelines. Contributions, feedback, and
extensions are encouraged to help evolve Lyra alongside the needs of the astronomical community.