nDspec: A new Python library for modelling multi-dimensional datasets in X-ray astronomy
Open Access
- 25 August 2026
- journal article
- research article
- Published by EDP Sciences in Astronomy & Astrophysics
- Vol. 712, A225
Abstract
Context. The current fleet of X-ray telescopes produces a wealth of multi-dimensional data, allowing us to study sources in time, photon energy, and polarisation. At the same time, it has become increasingly clear that progress in our physical understanding will only come from studying these sources in multiple dimensions simultaneously. Aims. Enabling multi-dimensional studies of X-ray sources requires new theoretical models predicting these datasets, new methods to analyse them, and, crucially, a software framework to combine data, models, and methods efficiently. However, the current ecosystem of software packages developed for X-ray data analysis does not provide the flexibility for advanced modelling of multi-dimensional datasets. Methods. In this paper, we introduce N D SPEC , a new python-based library designed to allow users to seamlessly model one- and multi-dimensional datasets common to X-ray astronomy. Unlike most other libraries, it is designed as a flexible, modular, and extensible framework capable of accommodating multi-dimensional data and able to connect to a range of different inference tools and algorithms. Results. Here we focus on modelling timing and spectral-timing data as a function of both Fourier frequency and energy, in addition to limited support for time-averaged spectra. We discuss design philosophy and current features, and showcase an example use case by characterising a NICER observation of a black hole X-ray binary. We also highlight plans for extensions to other dimensions and new features, such as the inclusion of polarimetry and the improved statistical methods for Bayesian inference.Keywords
All Related Versions
This publication has 59 references indexed in Scilit:
- A comparison of Bayesian sampling algorithms for high-dimensional particle physics and cosmology applicationsComputer Physics Communications, 2025
- SUSHI: An algorithm for source separation of hyperspectral images with non-stationary spectral variationAstronomy & Astrophysics, 2024
- ixpeobssim: A simulation and analysis framework for the imaging X-ray polarimetry explorerSoftwareX, 2022
- Array programming with NumPyNature, 2020
- SciPy 1.0: fundamental algorithms for scientific computing in PythonNature Methods, 2020
- X-ray reverberation around accreting black holesThe Astronomy and Astrophysics Review, 2014
- X-ray spectral modelling of the AGN obscuring region in the CDFS: Bayesian model selection and catalogueAstronomy & Astrophysics, 2014
- Astropy: A community Python package for astronomyAstronomy & Astrophysics, 2013
- Random Data2010
- On the X-ray time-lags in the black hole candidatesMonthly Notices of the Royal Astronomical Society, 2001