Table of Contents
Fetching ...

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.

nDspec: a new Python library for modelling multi-dimensional datasets in X-ray astronomy

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.

Paper Structure

This paper contains 15 sections, 18 equations, 13 figures, 4 tables.

Figures (13)

  • Figure 1: The NICER instrument response with different binning. Top left: the response in its native resolution, 3451 physical energy bins$\times$1501 channels (roughly containing 100 channels per keV). Top right: the response re-binned over channels down to 30 geometrically-spaced energy channels. Bottom left: the response re-binned over energies by a factor 30. Bottom right: the response re-binned over energies by a factor of 30, and over channels to 30 geometrically-spaced channels.
  • Figure 2: Comparison of nDspec folding a constant model. The blue, orange, green and red lines correspond to the top left, top right, bottom left and bottom right panels, respectively. As shown by the green line, re-binning over energies introduces distortions in the spectrum if the number of energy bins is not larger than the number of channels. On the other hand, re-binning over channels (orange line) or over both quantities (red line) does not significantly alter the output spectrum.
  • Figure 3: Comparison of a physical model before folding with the Swift?XRT response matrix (blue line), and of the same model folded and then un-folded in nDspec (orange line). The two agree over most of the energy range, but there is a noticeable discrepancy at energies below $\approx 1$ keV.
  • Figure 4: Data (black) together with the median of the posterior distribution (red solid line) and random draws from the posterior (pink lines). In addition to the data and total model, we also show the individual Lorentzian components for the posterior median only. While the contribution of the first Lorentzian is easily separated, the second and third overlap. The residuals are calculated using the posterior median.
  • Figure 5: The time-averaged spectrum (black) with the median of the posterior distribution (red) and random draws from the posterior (pink). The posteriors are very narrow, such that the posterior draws significantly overlap with each other and the posterior median as to be nearly invisible. The residuals are calculated using the posterior median only. Reflection features clearly visible in the residuals; modelling these is beyond the scope of this work.
  • ...and 8 more figures