jaxspec: A fast and robust Python library for X-ray spectral fitting

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 20 years and more. However, as models get more complex and spectra are obtained with 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 (GPUs), 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 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 software and approaches, meaning that jaxspec provides reliable results while being ~10 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).

Authors

Institutions

Publication Details

Journal
Astronomy and Astrophysics
Published
2024-09-14
DOI
https://doi.org/10.1051/0004-6361/202451736
Citations
4
Primary Topic
Particle Detector Development and Performance
Type
article
Field-Weighted Citation Impact
2.64
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

jaxspec: A fast and robust Python library for X-ray spectral fitting

D. Barret, Simon Dupourqué, C. M. Diez, Erwan Quintin et al.
4 citations
Astronomy and Astrophysics
Particle Detector Development and Performance
2.64
article

jaxspec: A fast and robust Python library for X-ray spectral fitting

D. Barret, Simon Dupourqué, C. M. Diez, Erwan Quintin, Stéphane Guillot
article en
4 citations

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 20 years and more. However, as models get more complex and spectra are obtained with 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 (GPUs), 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 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 software and approaches, meaning that jaxspec provides reliable results while being ~10 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).

Astronomy and AstrophysicsVol. 690
Centre National de la Recherche Scientifique (FR), Université Fédérale de Toulouse Midi-Pyrénées (FR), European Space Astronomy Centre (ES)
Openalex Percentile: Top 7%
Particle Detector Development and Performance
2.64
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.