nDspec: a new Python library for modelling multi-dimensional datasets in X-ray astronomy
Matteo Lucchini, Benjamin Ricketts, Phil Uttley, Daniela Huppenkothen
TL;DR
The paper addresses the challenge of jointly modelling multi-dimensional X-ray data by introducing nDspec, a modular Python library that uses an operator-based framework to forward-fold models through instrument responses and compute Fourier-domain timing products. It implements core components for spectral-timing analysis, including a ResponseMatrix, PowerSpectrum, and CrossSpectrum, and provides both optimization and MCMC inference alongside a growing library of phenomenological models. A NICER observation of a black hole X-ray binary is used to demonstrate end-to-end data reduction, power-spectrum fitting, time-averaged spectral modelling, and two-dimensional lag/cross-spectrum analysis, highlighting both capabilities and current limitations. The work lays groundwork for future extensions to polarization, multi-wavelength joint modelling, more sophisticated statistical back-ends, and performance optimizations, positioning nDspec as a flexible platform for advancing multi-dimensional X-ray astronomy analyses.
Abstract
The current fleet of X-ray telescopes produces a wealth of multi-dimensional data, allowing us to study sources in time, photon energy and polarization. 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. Enabling multi-dimensional studies of X-ray sources requires new theoretical models predicting these data sets, new methods to analyse them and a software framework to combine data, models and methods efficiently. In this paper, we introduce the alpha release of nDspec, a new python-based library designed to allow users to model one- and multi-dimensional datasets common to X-ray astronomy. In the alpha release, we focus on modelling time-averaged data as well as Fourier spectral-timing mode, but highlight how additional dimensions can be added. We discuss design philosophy and current features, and showcase an example use case by characterizing a NICER observation of a black hole X-ray binary. We also highlight current plans for extensions to other dimensions and new features.
