ASCL.net

Astrophysics Source Code Library

Making codes discoverable since 1999

Searching for codes credited to 'Zhang, Yan-Qiu'

Tip! Refine or expand your search. Authors are sometimes listed as 'Smith, J. K.' instead of 'Smith, John' so it is useful to search for last names only. Note this is currently a simple phrase search.

[submitted] ELISA: Efficient Library for Spectral Analysis in High-Energy Astrophysics

ELISA is a Python library designed for efficient spectral modeling and robust statistical inference. With user-friendly interface, ELISA streamlines the spectral analysis workflow.

The modeling framework of ELISA is flexible, allowing users to construct complex models by combining models of ELISA and XSPEC, as well as custom models. Parameters across different model components can also be linked. The models can be fitted to the spectral datasets using either Bayesian or maximum likelihood approaches. For Bayesian fitting, ELISA incorporates advanced Markov Chain Monte Carlo (MCMC) algorithms, including the No-U-Turn Sampler (NUTS), nested sampling, and affine-invariant ensemble sampling, to tackle the posterior sampling problem. For maximum likelihood estimation (MLE), ELISA includes two robust algorithms: the Levenberg-Marquardt algorithm and the Migrad algorithm from Minuit. The computation backend is based on Google's JAX, a high-performance numerical computing library, which can reduce the runtime for fitting procedures like MCMC, thereby enhancing the efficiency of analysis.

After fitting, goodness-of-fit assessment can be done with a single function call, which automatically conducts posterior predictive checks and leave-one-out cross-validation for Bayesian models, or parametric bootstrap for MLE. These methods offer greater accuracy and reliability than traditional fit-statistic/dof measures, and thus better model discovery capability. For comparing multiple candidate models, ELISA provides robust Bayesian tools such as the Widely Applicable Information Criterion (WAIC) and the Leave-One-Out Information Criterion (LOOIC), which are more reliable than AIC or BIC. Thanks to the object-oriented design, collecting the analysis results should be simple. ELISA also provide visualization tools to generate ready-for-publication figures.

ELISA is an open-source project and community contributions are welcome and greatly appreciated.