jaxspec : a fast and robust Python library for X-ray spectral fitting
arXiv:2409.05757 · doi:10.1051/0004-6361/202451736
Abstract
Context. Inferring spectral parameters from X-ray data is one of the cornerstones of high-energy astrophysics, and is achieved using software stacks that have been developed over the last twenty years and more. However, as models get more complex and spectra reach higher resolutions, these established software solutions become more feature-heavy, difficult to maintain and less efficient. Aims. We present jaxspec, a Python package for performing this task quickly and robustly in a fully Bayesian framework. Based on the JAX ecosystem, jaxspec allows the generation of differentiable likelihood functions compilable on core or graphical process units (resp. CPU and GPU), enabling the use of robust algorithms for Bayesian inference. Methods. We demonstrate the effectiveness of jaxspec samplers, in particular the No U-Turn Sampler, using a composite model and comparing what we obtain with the existing frameworks. We also demonstrate its ability to process high-resolution spectroscopy data and using original methods, by reproducing the results of the Hitomi collaboration on the Perseus cluster, while solving the inference problem using variational inference on a GPU. Results. We obtain identical results when compared to other softwares and approaches, meaning that jaxspec provides reliable results while being times faster than existing alternatives. In addition, we show that variational inference can produce convincing results even on high-resolution data in less than 10 minutes on a GPU. Conclusions. With this package, we aim to pursue the goal of opening up X-ray spectroscopy to the existing ecosystem of machine learning and Bayesian inference, enabling researchers to apply new methods to solve increasingly complex problems in the best possible way. Our long-term ambition is the scientific exploitation of the data from the newAthena X-ray Integral Field Unit (X-IFU).
arXiv commentAccepted for publication in A&A. Code and documentation can be found at jaxspec.readthedocs.io/en/latest/
References in corpus (33)
- Array Programming with NumPy
- Astropy: A Community Python Package for Astronomy
- emcee: The MCMC Hammer
- The Astropy Project: Sustaining and Growing a Community-oriented Open-source Project and the Latest Major Release (v5.0) of the Core Package
- On the Absorption of X-rays in the Interstellar Medium
- Variational Inference: A Review for Statisticians
- Binary companions of evolved stars in APOGEE DR14: Search method and catalog of ~5,000 companions
- Rank-normalization, folding, and localization: An improved for assessing convergence of MCMC
- X-ray spectral modelling of the AGN obscuring region in the CDFS: Bayesian model selection and catalogue
- Ultraluminous X-Ray Sources
- The Quiescent Intracluster Medium in the Core of the Perseus Cluster
- Optimal binning of X-ray spectra and response matrix design
- Surrogate models for precessing binary black hole simulations with unequal masses
- CMasher: Scientific colormaps for making accessible, informative and 'cmashing' plots
- A Hydrogen Atmosphere Spectral Model Applied to the Neutron Star X7 in the Globular Cluster 47 Tucanae
- Surrogate model of hybridized numerical relativity binary black hole waveforms
- The ultraluminous state revisited: fractional variability and spectral shape as diagnostics of super-Eddington accretion
- On the use of C-stat in testing models for X-ray spectra
- Euclid preparation: IX. EuclidEmulator2 -- Power spectrum emulation with massive neutrinos and self-consistent dark energy perturbations
- Atmospheric gas dynamics in the Perseus cluster observed with Hitomi
- Chi-square and Poissonian Data: Biases Even in the High-Count Regime and How to Avoid them
- Nested Sampling Methods
- RUN DMC: An efficient, parallel code for analyzing Radial Velocity Observations using N-body Integrations and Differential Evolution Markov chain Monte Carlo
- ULX spectra revisited: Accreting, highly magnetized neutron stars as the engines of ultraluminous X-ray sources
- Long-term X-ray spectral evolution of Ultraluminous X-ray sources: implications on the accretion flow geometry and the nature of the accretor
- JAX-COSMO: An End-to-End Differentiable and GPU Accelerated Cosmology Library
- CosmoPower-JAX: high-dimensional Bayesian inference with differentiable cosmological emulators
- How well can we measure supermassive black hole spin?
- A new candidate pulsating ULX in NGC 7793
- Testing the performance and accuracy of the RELXILL model for the relativistic X-ray reflection from accretion disks
- Inferring black hole spins and probing accretion/ejection flows in AGNs with the Athena X-ray Integral Field Unit
- candl: Cosmic Microwave Background Analysis with a Differentiable Likelihood
- Variational Inference as an alternative to MCMC for parameter estimation and model selection