$\texttt{bayes_spec}$: A Bayesian Spectral Line Modeling Framework for Astrophysics

Trey V. Wenger
2024-11-01
Abstract:$\texttt{bayes_spec}$ is a Bayesian spectral line modeling framework for astrophysics. Given a user-defined model and a spectral line dataset, $\texttt{bayes_spec}$ enables inference of the model parameters through different numerical techniques, such as Monte Carlo Markov Chain (MCMC) methods, implemented in the PyMC probabilistic programming library. The API for $\texttt{bayes_spec}$ is designed to support astrophysical researchers who wish to ``fit'' arbitrary, user-defined models, such as simple spectral line profile models or complicated physical models that include a full physical treatment of radiative transfer. These models are ``cloud-based'', meaning that the spectral line data are decomposed into a series of discrete clouds with parameters defined by the user's model. Importantly, $\texttt{bayes_spec}$ provides algorithms to determine the optimal number of clouds for a given model and dataset.
Instrumentation and Methods for Astrophysics,Astrophysics of Galaxies
What problem does this paper attempt to address?
The problem this paper attempts to address is the efficient and robust inference of physical conditions from spectral line observation data of the interstellar medium (ISM) in astrophysics. Specifically, traditional spectral line analysis methods typically rely on Gaussian decomposition and inverse modeling, which have two main issues: 1. **Degeneracy of Gaussian Decomposition**: Gaussian decomposition can lead to multiple different solutions, making it difficult to determine unique physical parameters. 2. **Assumptions of Inverse Modeling**: Inverse modeling methods require many assumptions, which may not fully align with actual conditions. To solve these problems, the authors propose a spectral line modeling tool based on a Bayesian framework—`bayes_spec`. `bayes_spec` overcomes the aforementioned issues in the following ways: 1. **Prior Knowledge**: Utilizes prior knowledge to reduce the space of possible solutions, improving the accuracy of the model. 2. **Explicit Assumptions**: All assumptions are explicitly included in the model rather than being pre-applied, making the model more transparent and reliable. `bayes_spec` supports user-defined models of arbitrary complexity, including simple spectral line profile models and complex physical models, and can automatically determine the optimal number of clouds. This allows researchers to more accurately infer the physical conditions of the ISM from observational data.