{"id":"c180962e-2167-4ff7-8399-18d55aa7c6ab","arxiv_id":"2512.10615","paper_version":2,"verdict":"ACCEPT","confidence":"HIGH","novelty_score":5.0,"correctness_risk":"low","formal_verification":"none","parameter_count":13,"one_line_summary":"nDspec is a modular Python framework for forward-modelling multi-dimensional X-ray data, demonstrated on spectral-timing fits to a NICER observation of a black hole X-ray binary.","lead":"This paper introduces nDspec, a new open-source Python library that lets X-ray astronomers fit models to data spanning both photon energy and time (spectral-timing data) at once. It is a flexible framework that packages the usual steps—instrument response folding, Fourier transforms, and Bayesian inference—so that multi-dimensional models can be tested against real observations.","discovery_kind":"extension","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Cross-spectrum linearity assumption is acknowledged but untested on the demo data; the failure of the full cross-spectrum fit could stem from this assumption rather than solely from missing reflection physics.","rationale":"The reader's weakest-assumption analysis correctly identifies the linearity of the impulse response formalism as the most load-bearing assumption in the cross-spectrum modelling. This is a structural feature of the main spectral-timing machinery, and it is explicitly acknowledged in the manuscript, but it is never empirically validated on the presented data. The full cross-spectrum fit fails with large structured residuals, and the authors attribute this to missing model physics (reflection). Yet the same residuals could be produced by the formalism's inability to capture nonlinear variability or intrinsic incoherence. The large fitted modulus renormalization factors (m1–m6) further suggest that the model is not capturing the amplitude–energy relationship, which is exactly where nonlinearity would show up. This concern does not invalidate the paper's central claim—that nDspec is a functional, modular framework for multi-dimensional X-ray modelling—because (a) the library explicitly supports direct cross-spectrum models that do not rely on the linear IRF, and (b) the paper honestly documents the failure and its limitations. The concern is about the scope of the built-in IRF pathway and the interpretation of the demo, not about the software's existence or basic correctness. The response folding is validated against Xspec to 1e-6, the power spectrum and lag fits are good, and the alpha release is open-source with a reproduction package. Since the linearity limitation is already stated and the software provides an alternative route for non-linear models, the ACCEPT verdict remains appropriate. However, adding a coherence or bicoherence analysis of the NICER data would substantially strengthen the paper by testing whether the linear assumption actually holds in its flagship demonstration.","tokens_in":21718,"tokens_out":5039,"duration_ms":54283,"concrete_test":"Using the same NICER event file (OBSID 1200120106) and the same energy/frequency binning as in Sec. 3.1, compute the intrinsic coherence (or squared coherence) between each of the 41 energy bands and the reference band (0.5–10 keV) over the six Fourier bins from 0.2–16 Hz, correcting for Poisson noise. If the coherence is significantly below unity (beyond statistical uncertainties) in any bin, the linear IRF assumption is violated for this source, and the full cross-spectrum fit failure cannot be uniquely attributed to missing reflection components. Alternatively, compute the bicoherence to detect higher-order Fourier coupling; nonzero bicoherence would directly falsify the 'higher-order terms negligible' requirement.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The core cross-spectrum machinery in nDspec rests on the linear impulse response formalism (Eqs. 2–4, Sec. 2.2). This formalism assumes that the variability can be described by a single driving signal s(t) convolved with a linear, energy-dependent response g(E,t), which implies that the intrinsic coherence is unity at all frequencies/energies and that higher-order Fourier products (e.g., bispectrum) vanish. The paper explicitly acknowledges this limitation, noting that nonlinearity would break the formalism. However, the demonstration on MAXI J1820+070 does not test this assumption: the full cross-spectrum fit fails with χ2/dof=2.99, and the authors attribute the residuals to a missing relativistic reflection component. An equally plausible explanation is that the source exhibits significant intrinsic incoherence or nonlinear variability, in which case the linear formalism would predict an incorrect cross spectrum regardless of model complexity. Support for this concern comes from the fitted modulus renormalization constants (m1–m6 in Table 4), which deviate from unity by as much as 38% (0.73–1.38); such large frequency-dependent corrections suggest the model is compensating for a systematic mismatch in the energy/frequency dependence of the variability amplitude, not just a simple normalization error. Because the library does allow users to implement non-linear cross-spectrum models directly in the Fourier domain, the software claim is not invalidated, but the built-in IRF pathway and the physical interpretation of the demo's cross-spectrum failure rest on an untested linearity assumption.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"This paper introduces nDspec, an open-source Python library for forward-modelling multi-dimensional X-ray data. The library currently supports time-averaged spectra, Fourier power spectra, and cross spectra (phase lags, modulus, complex products), using an operator-based architecture: instrument response folding, Fourier transforms (FFT and sinc decomposition), and inference via χ² optimization and emcee MCMC. Unit tests verify response folding against Xspec to 1e-6. The demonstration on a NICER observation of MAXI J1820+070 includes: a 3-Lorentzian fit to the power spectrum (χ²/dof=1.05), a diskbb+powerlaw fit to the time-averaged spectrum (χ²/dof=2.49 with residuals attributed to reflection), and a pivoting-powerlaw + reverberation model fit to energy-dependent phase lags (χ²/dof=1.76). A full modulus+phase cross-spectrum fit is also attempted and fails (χ²/dof=2.99), which the authors interpret as missing relativistic reverberation. Limitations, including the linear IRF assumption and the lack of non-Gaussian likelihoods, are acknowledged.","tokens_in":22116,"tokens_out":8795,"duration_ms":90883,"significance":"The paper addresses a genuine gap: existing X-ray modelling packages are largely 1D or instrument-specific, whereas nDspec provides a modular framework where models, responses, Fourier transforms, and inference are composable. If the software performs as claimed, it will enable joint spectral-timing-polarimetric modelling and is likely to become a useful community tool. Strengths include a reproducibility package (Zenodo), open-source code, and machine-checked agreement with Xspec for response folding. The honest reporting of the failed full cross-spectrum fit is also a strength: it demonstrates that the framework can identify model inadequacy rather than forcing an overparameterized fit. The alpha-release limitations (Gaussian likelihood only, no Xspec wrapper, no polarimetry) are clearly stated and are not obstacles to the underlying design.","major_comments":[{"comment":"The text contains a direct contradiction. It states 'We begin as previously with least-squares optimization, without enabling the phase re-normalization... The results are shown in Fig.6 and 7; ... χ2/d.o.f.=397.92/226=1.76.' Two paragraphs later: 'we found that enabling the phase renormalization ... improved the quality of all fits without affecting the other parameters, so in the manuscript we only report fits in which it has been enabled.' This makes it impossible to determine whether the reported lag fit (and the corresponding parameters in Table 3) were obtained with or without the six extra phase parameters. Please clarify the exact sequence and state in the figure/table captions which configuration is being reported. This is needed for reproducibility of the central demonstration.","section":"Sec. 3.4, phase renormalization"},{"comment":"The cross-spectrum machinery is built on the linear IRF formalism (Eqs. 2–4), which assumes unity intrinsic coherence and zero bispectrum. The paper acknowledges this, but the full cross-spectrum demonstration does not test it. The fit fails with χ2/dof=2.99 and the residuals are interpreted as missing relativistic reverberation. An equally plausible interpretation is that the source variability is nonlinear or intrinsically incoherent, in which case Eq. (4) would be invalid irrespective of the model. I recommend computing the intrinsic coherence of the data (e.g., from the averaged cross spectrum and the two power spectra) or fitting a direct Fourier-domain cross-spectrum model as a control. This would either support the reverberation interpretation or reveal a more fundamental limitation. This is a suggestion to strengthen the interpretation; it does not invalidate the software claim,","section":"Sec. 2.2 / Sec. 3.4, linearity assumption"}],"minor_comments":[{"comment":"The notation S²(ν) should be |S(ν)|²; the power spectrum is |S(ν)|², not S(ν)², since S(ν) is complex. The accompanying text 'S²(ν) is, by definition, the power spectrum' is therefore incorrect.","section":"Eq. (4)"},{"comment":"The sentence describing 'the transfer function S(E,ν)' should read G(E,ν); in Eq. (3), S is the transform of the driving signal and G is the transfer function.","section":"Sec. 2.2, near Eq. (3)"},{"comment":"The entry for s_t reports '0+*;* −0.001'; please clarify the notation for a parameter pinned at a limit.","section":"Table 4"},{"comment":"The captions describe 'the same model shown in fig.6' and 'fig.8'; this is redundant and can be confusing when figures are viewed separately.","section":"Fig. 7 and Fig. 9 captions"},{"comment":"The text states that only Gaussian uncertainties are supported. It may be worth noting explicitly that χ² fitting of cross-spectrum modulus and phase treats those estimates as Gaussian, which is an approximation for finite integration lengths.","section":"Sec. 2.3.1"}],"recommendation":"minor_revision","confidential_remarks":"The manuscript is suitable for publication in A&A as a software paper. The skeptic's nonlinearity concern is reasonable but, in my view, does not require rejection: the IRF limitation is explicitly stated and the library already supports non-IRF models. The main issue is the phase-renormalization ambiguity, which must be fixed. If the authors can add a coherence test, it would strengthen the cross-spectrum section, but I do not see it as a blocker. The paper is honest about the failed full cross-spectrum fit, which is a point in its favor."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Worth a look. This is a software paper that fills a real gap: a Python library for forward-modelling multi-dimensional X-ray data — time-averaged spectra, power spectra, lags, cross-spectra — with a design that actually feels modular. The operator-based architecture is new, and the pivoting-power-law parametrisation (Eqs. 18–19) is a more restrictive, arguably more usable alternative to reltrans. What I like most is the honesty. The response folding is checked against Xspec to 1e-6, which is the kind of reproducible validation you want from an alpha release. The demo fits the power spectrum and lag spectra well, then explicitly shows the time-averaged and full cross-spectrum fits failing, with structured residuals that point to missing reflection and reverberation. They don't polish over that. Reproduction package and docs are included; that's real evidence of good practice.\n\nSoft spots, in proportion. The linearity assumption behind the impulse-response formalism is acknowledged in Sec. 2.2 but not directly tested on the demo data — no intrinsic-coherence or bispectrum check. The stress-test worry about this is fair: the full cross-spectrum failure at chi2/dof=2.99 could in principle be nonlinearity rather than just missing reflection. But the residual pattern (soft excess, ~6 keV line) matches the time-averaged spectral residuals, so reflection is the more economical explanation. The modulus renormalisation constants deviating up to ~40% from unity are worth a closer look, though; the paper treats them as nuisance corrections but doesn't discuss why they need to be that large. That's a minor gap, not a fatal one. Also, the current Gaussian-only likelihoods are a real limitation for low-count data, but they state that as a future item.\n\nThe central argument holds: the framework is useful, the implementation is sane, and the failures are reported as clearly as the successes. For anyone doing spectral-timing model fitting, this is a tool to follow and probably to use. I'd send it to peer review without hesitation — the referee will have concrete code to test against, and the paper will benefit from a few sharp questions about the cross-spectrum assumptions and the renormalisation terms, but there's no desk-reject case here.","headline":"A solid, honest software-release paper for a genuinely missing modular spectral-timing framework; the demo shows what works and what doesn't, and the linearity caveat is standard and stated, not fatal.","tokens_in":22618,"tokens_out":1484,"would_cite":true,"duration_ms":19110,"reading_group":"yes","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"nDspec is a Python library that models X-ray spectra, variability power, and energy-dependent lags in one operator-based framework, demonstrated on a bright black hole binary with clear diagnosis of where simple models fail.","keywords":["multi-dimensional X-ray data","spectral-timing","cross spectrum","impulse response formalism","forward modelling","black hole X-ray binaries","NICER","Python astronomy software"],"falsifier":"Measure the intrinsic coherence of a bright accreting source over a wide range of Fourier frequencies and energies and look for a significant dip below unity where the transfer function is well constrained, or for detectable bispectral power. Because the formalism fixes coherence at unity, such a detection would make any full cross-spectrum fit systematically wrong at those frequencies, independent of the impulse response chosen. A cheaper version: generate a synthetic dataset from a known nonlinear process (multiplicative or squared variability), fit it with the library, and show that no line","tokens_in":21632,"feed_emoji":"🛰️","tokens_out":14948,"duration_ms":130262,"temperature":0.7,"pith_summary":"nDspec is the alpha release of a Python library that aims to supply what the X-ray astronomy software ecosystem lacks: a single modular framework in which astronomers forward-model the multi-dimensional datasets modern telescopes produce — time-averaged spectra, variability power spectra, and cross spectra (energy-dependent lags) — instead of analysing each dimension separately. Its design treats instrument-response convolution, Fourier transforms, and model-data comparison as composable operators, so the same model component can predict several observables and parameters can be constrained jointly across datasets. The paper demonstrates the library on a bright NICER observation of the black hole X-ray binary MAXI J1820+070: the included phenomenological models fit the power spectrum (reduced χ² ≈ 1.05) and the energy- and frequency-dependent phase lags (reduced χ² ≈ 1.76), while the full cross-spectrum fit fails (reduced χ² ≈ 2.99), with residuals pointing to a missing relativistic reverberation component. If the framework works as claimed, it lowers the barrier to joint spectral-timing modelling and provides a common base for future extensions such as polarimetry, non-Gaussian likelihoods, and more advanced samplers. The authors are explicit that the cross-spectrum machinery rests on a linearity assumption whose breakdown is beyond the present scope.","feed_headline":"One Python library fits X-ray spectra, variability, and lags together","feed_subtitle":"A modular framework fits a black hole binary's spectra, variability, and lags — and shows where simple models fail","key_machinery":"Two elements carry the argument. First, the linear impulse response (IRF) formalism: the system's response to a delta-function flash is g(E,t), and its Fourier transform G(E,ν) is the transfer function; the convolution theorem turns time-domain convolution into Fourier-domain multiplication, so cross spectra are computed as C(E,ν) = P(ν) G(E,ν) G*(E_ref,ν). Second, the operator framework: each transformation applied to a model — folding through the detector response matrix, Fourier transformation, power/cross-spectrum construction, comparison with data — is a composable class, so a single model, whether defined in the time domain, as a transfer function, or directly as a cross spectrum, can","core_discovery":"nDspec's central claim is that the linear impulse-response formalism, embedded in an operator-based software design, is sufficient to build a general-purpose framework for multi-dimensional X-ray modelling. The time-dependent flux in an energy band is written f(E,t) = s(t) ⊛ g(E,t): a driving variability signal convolved with an energy- and time-dependent impulse response. In the Fourier domain the cross spectrum between any band and a reference band becomes C(E,ν) = P(ν) G(E,ν) G*(E_ref,ν) — all energy dependence of timing products is carried by the transfer function G(E,ν), while the driving power spectrum P(ν) acts as a frequency-dependent weight. The library chains operator classes that","pith_inferences":["The joint pattern of residuals — near 6 keV in both the time-averaged spectrum and the cross-spectrum modulus — suggests the cross-spectrum modulus is a sharper test of reverberation models than phase lags alone; a plausible next step is to make full modulus-plus-phase fits the benchmark for new physical models rather than lag-energy spectra.","The linearity assumption draws the framework's boundary: any source with intrinsic coherence measurably below unity, or with significant bispectral power, falls outside what the current cross-spectrum class can represent; introducing a coherence parameter or a nonlinear impulse-response treatment would extend the formalism without redesigning the operator chain.","Because all energy dependence of timing products flows through the transfer function G(E,ν), testing competing geometries (a lamppost corona versus extended Comptonization, for instance) reduces to substituting different impulse responses — a comparison that the current phenomenological components only hint at, but that the operator chain already supports.","The paper's repeated warnings about energy-rebinning and unfolding amount to a methodological recommendation: for multi-dimensional products such as rms and lag-energy spectra, forward-folding through the full instrument response is the safe default, and the library is designed around that path."],"forward_implications":["The same model component can be fitted simultaneously to a time-averaged spectrum, a power spectrum, and a lag spectrum, pulling constraints from all three observables rather than analysing each dimension in isolation.","The demonstration quantifies what current phenomenological models can and cannot do: power spectrum (reduced χ² = 1.05) and energy-dependent lags (reduced χ² = 1.76) fit well, while the full cross spectrum (reduced χ² = 2.99) shows structured residuals at soft energies and near 6 keV, localizing the missing physics to relativistic reverberation.","Because the Fourier transform can be computed on arbitrary logarithmic grids through a sinc-function decomposition, reverberation models requiring fine time resolution at short delays can be evaluated without uniform oversampling.","The operator design allows new dimensions — polarimetry, multi-wavelength data, phase-resolved spectra — to be added as new operators and model components, and later releases plan non-Gaussian likelihoods and more advanced sampling methods."],"fun_headline_variants":["nDspec: Python library for multi-dimensional X-ray modelling","Modular Python tool nDspec fits X-ray spectra and timing together","nDspec links energy-dependent variability in a single Python framework","One Python library for X-ray spectra, variability, and timing","Flexible X-ray modelling: nDspec joins spectra, variability, and lags"],"cache_read_input_tokens":2304,"weakest_assumption_plain":"The cross-spectrum machinery stands on the assumption that source variability is linear: flux in every energy band is a convolution of one driving signal with a fixed impulse response, so the intrinsic coherence is exactly one and higher-order Fourier products vanish. If a source's variability is significantly nonlinear, predicted lags and cross-spectrum amplitudes will be wrong no matter how good the model components are — a limitation the paper itself acknowledges as beyond","fun_headline_variants_meta":{"raw":{"variants":["nDspec: Python library for multi-dimensional X-ray modelling","Modular Python tool nDspec fits X-ray spectra and timing together","nDspec links energy-dependent variability in a single Python framework","One Python library for X-ray spectra, variability, and timing","Flexible X-ray modelling: nDspec joins spectra, variability, and lags"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.001718,"raw_usage":{"total_tokens":6666,"prompt_tokens":809,"completion_tokens":5857,"prompt_tokens_details":{"cached_tokens":256},"prompt_cache_hit_tokens":256,"prompt_cache_miss_tokens":553,"completion_tokens_details":{"reasoning_tokens":5764}},"tokens_in":553,"tokens_out":5857,"duration_ms":38190,"temperature":1.0,"reasoning_tokens":5764,"cache_read_input_tokens":256,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-03T17:04:19.196953+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Measure the intrinsic coherence of a bright accreting source over a wide range of Fourier frequencies and energies and look for a significant dip below unity where the transfer function is well constrained, or for detectable bispectral power. Because the formalism fixes coherence at unity, such a detection would make any full cross-spectrum fit systematically wrong at those frequencies, independent of the impulse response chosen. A cheaper version: generate a synthetic dataset from a known nonlinear process (multiplicative or squared variability), fit it with the library, and show that no line","supporting_citations":[],"review_version":1}