pith. sign in

arxiv: 2605.21149 · v1 · pith:JBLR6VXCnew · submitted 2026-05-20 · 🌌 astro-ph.CO · astro-ph.IM

CosmoForge I: A unified framework for QML power spectrum estimation and pixel-based likelihood analysis

Pith reviewed 2026-05-21 02:05 UTC · model grok-4.3

classification 🌌 astro-ph.CO astro-ph.IM
keywords cosmic microwave backgroundquadratic maximum likelihoodpower spectrum estimationpixel-based likelihoodPython frameworkSherman-Morrison-Woodburynumerical validation
0
0 comments X

The pith

CosmoForge unifies QML power spectrum estimation and pixel-based likelihood in one validated Python framework.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The paper presents CosmoForge as a public Python framework that combines quadratic maximum likelihood estimation of cosmic microwave background power spectra with pixel-based Gaussian likelihood evaluation for spin-0 and spin-2 fields. It handles general non-diagonal noise covariances and supplies two interchangeable computation bases, one harmonic via the Sherman-Morrison-Woodbury identity and one direct in pixel space, choosing the cheaper route for each configuration. The code achieves an O(ℓ_max^4) cost for the Fisher matrix through algorithmic optimisations, Numba JIT compilation, and MPI parallelisation. It reproduces the Planck low-ℓ Fortran reference implementation exactly across both pipelines in double-precision arithmetic. The same covariance infrastructure powers estimation and likelihood, with native multipole binning and three output normalisations available through a single path.

Core claim

A single modular Python codebase performs both quadratic maximum likelihood power spectrum estimation and pixel-space likelihood analysis for fields on the sphere while reproducing the Planck low-ℓ reference implementation to double-precision accuracy, using interchangeable harmonic and pixel-space bases selected for efficiency and sharing a common covariance infrastructure.

What carries the argument

Common covariance infrastructure that powers both QML estimation and likelihood evaluation, with selection between a harmonic basis built on the Sherman-Morrison-Woodbury identity and a direct pixel-space basis.

If this is right

  • Native multipole binning and three output normalisations become available through one code path for both estimation and likelihood.
  • The Fisher matrix computation reaches O(ℓ_max^4) scaling for arbitrary noise covariances.
  • Exact reproduction of the Planck reference guarantees consistency when swapping between QML estimation and likelihood evaluation.
  • The modular structure extends the same infrastructure to non-CMB observables on the sphere.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • The dual-basis selection could support hybrid computations for datasets larger than current Planck-scale maps.
  • Validation against additional simulated noise configurations would test the claimed equivalence beyond the Planck reference.
  • The shared covariance tools could serve as a benchmark for other low-ℓ spherical analyses that require both estimation and likelihood steps.

Load-bearing premise

The two interchangeable computation bases produce numerically equivalent results for arbitrary noise covariances, with equivalence shown only through reproduction of the Planck low-ℓ case.

What would settle it

A direct numerical comparison of the harmonic and pixel-space bases on a dataset with a custom non-diagonal noise covariance that differs from the Planck setup, checking whether the recovered power spectra or likelihood values differ beyond double-precision rounding.

Figures

Figures reproduced from arXiv: 2605.21149 by Giacomo Galloni, Luca Pagano.

Figure 1
Figure 1. Figure 1: Architecture and data flow of CosmoForge. The standard inputs (top: data d, mask, noise covariance N, fiducial power spectrum C fid ℓ , beam and pixel windows Bℓ , pℓ) feed CosmoCore, which exposes a common ComputationBasis interface with two interchangeable implementations — the harmonic basis (left), where C −1 and ln |C| are obtained from the Sherman–Morrison– Woodbury identity and the matrix determinan… view at source ↗
Figure 2
Figure 2. Figure 2: Monte Carlo validation of the QML estimator for the [PITH_FULL_IMAGE:figures/full_fig_p008_2.png] view at source ↗
Figure 3
Figure 3. Figure 3: Standard deviation of the estimated BB power spectrum over 10 000 MC realisations (solid lines) compared to the Fisher￾predicted error bars (dashed lines), for five sky fractions: full sky (red), ±10◦ Galactic cut (blue), ±18◦ (green), ±30◦ (orange), and ±40◦ (magenta). Configuration: Nside = 16, ℓmax = 32, spin-2 (Q, U) analysis. Variance and sky fraction dependence [PITH_FULL_IMAGE:figures/full_fig_p008… view at source ↗
Figure 4
Figure 4. Figure 4: shows the mean-χ 2 likelihood L¯(r) ∝ exph − 1 2 ⟨χ 2 (r)⟩simsi , (31) constructed from the per-realisation χ 2 (r) across Nsims = 1000 Monte Carlo simulations. We stress that L¯(r) is not the sam￾ple average of the per-realisation likelihoods ⟨L(r)⟩sims: the two coincide only in the limit of small χ 2 fluctuations across realisa￾tions, since by Jensen’s inequality (Jensen 1906) ⟨exp −χ 2 /2  ⟩ ≥ exp −⟨… view at source ↗
Figure 5
Figure 5. Figure 5: Comparison of CosmoForge’s QML estimator and the public NaMaster pseudo-Cℓ implementation (Alonso et al. 2019) over Nsims = 1000 simulations of CMB-plus-noise TT maps at Nside = 32, ℓmax = 64, σ = 1.5 µK per pixel (∼ 520 µK arcmin in TT, TT-equivalent of 2 µK arcmin polarisation noise at ℓ = 50), for two Galactic-strip masks (fsky ≈ 0.10 and 0.60). Left: mean recovered D TT ℓ bandpowers at fsky ≈ 0.60 (per… view at source ↗
Figure 6
Figure 6. Figure 6: Empirical bandpower correlation matrices for the same configuration as Fig. 5. Each panel uses a split-triangle layout: [PITH_FULL_IMAGE:figures/full_fig_p011_6.png] view at source ↗
read the original abstract

Optimal power spectrum estimation on the largest angular scales of the cosmic microwave background relies on the Quadratic Maximum Likelihood (QML) estimator. Existing public implementations, however, each address only a subset of the problem and none combine power spectrum estimation with a self-consistent pixel-space likelihood within a single framework. We present CosmoForge, a public Python framework that unifies QML power spectrum estimation and pixel-based Gaussian likelihood evaluation for spin-0 and spin-2 fields on the sphere, with general (non-diagonal) noise covariances. The framework is split into three installable packages: CosmoCore (infrastructure), QUBE (Fisher and QML estimation), and PICSLike (pixel-space likelihood). A common interface exposes two interchangeable computation bases $-$ a harmonic basis built on the Sherman-Morrison-Woodbury identity and a direct pixel-space basis $-$ selecting whichever is cheaper for the configuration at hand. Exact algorithmic optimisations reduce the Fisher cost to $\mathcal{O}(\ell_{\rm max}^4)$ for arbitrary noise covariances, with Numba JIT compilation of the hot kernels and MPI parallelisation of the likelihood scan. CosmoForge reproduces the Planck low-$\ell$ Fortran reference implementation across both the QML and pixel-space likelihood pipelines, consistently with double-precision arithmetic. Native multipole binning and three output normalisations (deconvolved, decorrelated, window-convolved) are exposed through a single code path, and the same covariance infrastructure powers both QML estimation and likelihood evaluation. CosmoForge offers a general-purpose, modular, and validated tool for the optimal analysis of large-scale data on the sphere. It is publicly available, pip-installable, and extensible to non-CMB observables.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

2 major / 2 minor

Summary. The manuscript introduces CosmoForge, a public Python framework (split into CosmoCore, QUBE, and PICSLike) that unifies Quadratic Maximum Likelihood (QML) power spectrum estimation and pixel-based Gaussian likelihood analysis for spin-0 and spin-2 fields on the sphere with general (non-diagonal) noise covariances. It exposes two interchangeable computation bases—a harmonic basis using the Sherman-Morrison-Woodbury identity and a direct pixel-space basis—automatically selecting the cheaper option, claims exact reproduction of the Planck low-ℓ Fortran reference in double precision, and reports algorithmic optimizations reducing Fisher matrix cost to O(ℓ_max^4) along with Numba JIT, MPI parallelization, native multipole binning, and multiple output normalizations.

Significance. If the central claims hold, the work supplies a modular, publicly available, pip-installable tool that fills a gap by combining QML estimation and self-consistent pixel-space likelihood in one extensible framework for large-scale CMB analysis. The reproduction of an external reference implementation, support for arbitrary noise, and optimizations represent practical advances that could improve reproducibility and accessibility in the field.

major comments (2)
  1. [Computational Bases and Validation] The central claim that the harmonic (Sherman-Morrison-Woodbury) and direct pixel-space bases are interchangeable and yield numerically equivalent results for arbitrary noise covariances is load-bearing for the framework's design. Validation is reported only via reproduction of the Planck low-ℓ Fortran reference (specific noise structure and low-ℓ regime). No cross-validation on synthetic covariances with varied eigenvalue spectra, condition numbers, or correlation lengths is described, leaving open the possibility of discrepancies in conditioning or round-off accumulation between the two routes.
  2. [Abstract and Algorithmic Optimizations] The abstract states that 'exact algorithmic optimisations reduce the Fisher cost to O(ℓ_max^4) for arbitrary noise covariances,' but provides no derivation, complexity analysis, or pointer to the relevant section/equation where this scaling is shown. This omission weakens the ability to assess the claimed improvement independently of the Planck reproduction test.
minor comments (2)
  1. [Abstract] The abstract lists 'three output normalisations (deconvolved, decorrelated, window-convolved)' exposed through a single code path; a short description of how each is computed and when each should be used would improve clarity for readers unfamiliar with the distinctions.
  2. [Results and Performance] A table or figure summarizing wall-clock timings or memory usage for the two bases across a range of ℓ_max and noise covariance densities would help readers evaluate the automatic selection logic in practice.

Simulated Author's Rebuttal

2 responses · 0 unresolved

We thank the referee for their careful reading of the manuscript and for the constructive comments. We address each major point below and describe the changes that will be made in the revised version.

read point-by-point responses
  1. Referee: [Computational Bases and Validation] The central claim that the harmonic (Sherman-Morrison-Woodbury) and direct pixel-space bases are interchangeable and yield numerically equivalent results for arbitrary noise covariances is load-bearing for the framework's design. Validation is reported only via reproduction of the Planck low-ℓ Fortran reference (specific noise structure and low-ℓ regime). No cross-validation on synthetic covariances with varied eigenvalue spectra, condition numbers, or correlation lengths is described, leaving open the possibility of discrepancies in conditioning or round-off accumulation between the two routes.

    Authors: We agree that additional cross-validation on synthetic covariances would strengthen the demonstration of numerical equivalence between the two bases. Although the Planck low-ℓ reproduction already exercises both pipelines with realistic non-diagonal noise, we will add a dedicated subsection to the validation section presenting comparisons on synthetic data sets with controlled eigenvalue spectra, condition numbers, and correlation lengths. These tests will quantify agreement to within double-precision round-off and will be included in the revised manuscript. revision: yes

  2. Referee: [Abstract and Algorithmic Optimizations] The abstract states that 'exact algorithmic optimisations reduce the Fisher cost to O(ℓ_max^4) for arbitrary noise covariances,' but provides no derivation, complexity analysis, or pointer to the relevant section/equation where this scaling is shown. This omission weakens the ability to assess the claimed improvement independently of the Planck reproduction test.

    Authors: We thank the referee for highlighting this omission. The O(ℓ_max^4) scaling follows from the optimized matrix multiplications that exploit the block structure of the spherical-harmonic covariance and the Sherman-Morrison-Woodbury update, replacing the naive O(ℓ_max^6) cost. In the revised manuscript we will insert a concise complexity analysis and derivation in the algorithmic section, together with explicit cross-references from the abstract to the relevant equations. revision: yes

Circularity Check

0 steps flagged

No circularity: external validation against Planck Fortran reference

full rationale

The manuscript presents a software implementation framework (CosmoForge) that unifies QML estimation and pixel-space likelihood evaluation, with two interchangeable bases (SMW-harmonic and direct pixel-space) whose equivalence is asserted for general noise covariances. All load-bearing claims reduce to reproduction of an external Planck low-ℓ Fortran reference implementation in double precision, together with stated algorithmic complexity reductions and Numba/MPI optimizations. No mathematical derivations, parameter fits, or uniqueness theorems are advanced that could loop back to the paper's own inputs or self-citations; the central numerical equivalence is externally benchmarked rather than internally constructed.

Axiom & Free-Parameter Ledger

0 free parameters · 1 axioms · 0 invented entities

The framework rests on standard linear-algebra identities and existing QML theory; no new physical constants, free parameters, or postulated entities are introduced.

axioms (1)
  • standard math Sherman-Morrison-Woodbury identity for efficient inversion of low-rank updates to covariance matrices
    Invoked to enable the harmonic-basis route for arbitrary noise covariances.

pith-pipeline@v0.9.0 · 5845 in / 1260 out tokens · 22358 ms · 2026-05-21T02:05:23.441302+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

39 extracted references · 39 canonical work pages · 4 internal anchors

  1. [1]

    , title =

    Tegmark, M. , title =. Phys.\ Rev.\ D , volume =

  2. [2]

    and de Oliveira-Costa, A

    Tegmark, M. and de Oliveira-Costa, A. , title =. Phys.\ Rev.\ D , volume =

  3. [3]

    Uncorrelated measurements of the CMB power spectrum

    Tegmark, M. and Hamilton, A. J. S. , title =. Relativistic Astrophysics: 18th Texas Symposium , year =. astro-ph/9702019 , archivePrefix =

  4. [4]

    Bond, J. R. and Jaffe, A. H. and Knox, L. , title =. Phys.\ Rev.\ D , volume =

  5. [5]

    and Kosowsky, A

    Kamionkowski, M. and Kosowsky, A. and Stebbins, A. , title =. Phys.\ Rev.\ D , volume =

  6. [6]

    and Seljak, U

    Zaldarriaga, M. and Seljak, U. , title =. Phys.\ Rev.\ D , volume =

  7. [7]

    Goldberg, J. N. and Macfarlane, A. J. and Newman, E. T. and Rohrlich, F. and Sudarshan, E. C. G. , title =. J.\ Math.\ Phys. , volume =

  8. [8]

    Woodbury, M. A. , title =

  9. [9]

    Golub, G. H. and Van Loan, C. F. , title =

  10. [10]

    Bilbao-Ahedo, J. D. and Barreiro, R. B. and Vielva, P. and Mart. JCAP , volume =. 2021 , eprint =

  11. [11]

    and Henrot-Versill

    Vanneste, S. and Henrot-Versill. Quadratic estimator for. Phys.\ Rev.\ D , volume =. 2018 , eprint =

  12. [12]

    and de Rosa, A

    Gruppuso, A. and de Rosa, A. and Cabella, P. and Paci, F. and Finelli, F. and Natoli, P. and de Gasperis, G. and Mandolesi, N. , title =. MNRAS , volume =. 2009 , eprint =

  13. [13]

    Optimized large-scale

    Gjerl. Optimized large-scale. ApJS , volume =. 2015 , eprint =

  14. [14]

    QML-FAST -- A Fast Code for low-$\ell$ Tomographic Maximum Likelihood Power Spectrum Estimation

    Kvasiuk, Y. and Lai, A. and M. arXiv e-prints , year =. 2510.05215 , archivePrefix =

  15. [15]

    Hivon, E. and G. ApJ , volume =

  16. [16]

    and Sanchez, J

    Alonso, D. and Sanchez, J. and Slosar, A. and. A unified pseudo-. MNRAS , volume =. 2019 , eprint =

  17. [17]

    and Challinor, A

    Lewis, A. and Challinor, A. and Lasenby, A. , title =. ApJ , volume =. 2000 , eprint =

  18. [18]

    and Lewis, A

    Howlett, C. and Lewis, A. and Hall, A. and Challinor, A. , title =. JCAP , volume =. 2012 , eprint =

  19. [19]

    and Singer, L

    Zonca, A. and Singer, L. and Lenz, D. and Reinecke, M. and Rosset, C. and Hivon, E. and Gorski, K. , title =. J.\ Open Source Softw. , volume =

  20. [20]

    Hunter, J. D. , title =. Comput.\ Sci.\ Eng. , volume =

  21. [21]

    and Gommers, R

    Virtanen, P. and Gommers, R. and Oliphant, T. E. and others , title =. Nat.\ Methods , volume =

  22. [22]

    Harris, C. R. and Millman, K. J. and van der Walt, S. J. and others , title =. Nature , volume =

  23. [23]

    and Fang, Y.-L

    Dalcin, L. and Fang, Y.-L. L. , title =. Comput. Sci. Eng. , volume =. 2021 , doi =

  24. [24]

    Proceedings of the Second Workshop on the

    Lam, Siu Kwan and Pitrou, Antoine and Seibert, Stanley , title =. Proceedings of the Second Workshop on the. 2015 , publisher =

  25. [25]

    2016 , eprint =

    A&A , volume =. 2016 , eprint =

  26. [26]

    and Cardoso, J.-F

    Benabed, K. and Cardoso, J.-F. and Prunet, S. and Hivon, E. , title =. A&A , volume =

  27. [27]

    2020 , eprint =

    A&A , volume =. 2020 , eprint =

  28. [28]

    and Delouis, J.-M

    Pagano, L. and Delouis, J.-M. and Mottet, S. and Puget, J.-L. and Vibert, L. , title =. A&A , volume =. 2020 , eprint =

  29. [29]

    Phys.\ Rev.\ Lett

    Improved constraints on primordial gravitational waves using. Phys.\ Rev.\ Lett. , volume =

  30. [30]

    and others , title =

    Tristram, M. and others , title =. Phys.\ Rev.\ D , volume =

  31. [31]

    PTEP , volume =

    Probing cosmic inflation with the. PTEP , volume =

  32. [32]

    and others , title =

    Ade, P. and others , title =. JCAP , volume =

  33. [33]

    and others , title =

    Abazajian, K. and others , title =. ApJ , volume =

  34. [34]

    and Campeti, P

    Galloni, G. and Campeti, P. and Pagano, L. and Gerbino, M. and Lattanzi, M. and Natoli, P. , title =. JCAP , volume =. 2025 , eprint =

  35. [35]

    and Challinor, A

    Chon, G. and Challinor, A. and Prunet, S. and Hivon, E. and Szapudi, I. , title =. MNRAS , volume =. 2004 , doi =

  36. [36]

    Tristram, M. and Mac. MNRAS , volume =. 2005 , doi =

  37. [37]

    Polarized CMB power spectrum estimation using the pure pseudo-cross-spectrum approach

    Grain, J. and Tristram, M. and Stompor, R. , title =. PhRvD , volume =. 2009 , doi =. 0903.2350 , archivePrefix =

  38. [38]

    Three Year Wilkinson Microwave Anisotropy Probe (WMAP) Observations: Polarization Analysis

    Page, L. and Hinshaw, G. and Komatsu, E. and Nolta, M. R. and Spergel, D. N. and Bennett, C. L. and Barnes, C. and Bean, R. and Dor\'e, O. and Dunkley, J. and Halpern, M. and Hill, R. S. and Jarosik, N. and Kogut, A. and Limon, M. and Meyer, S. S. and Odegard, N. and Peiris, H. V. and Tucker, G. S. and Verde, L. and Weiland, J. L. and Wollack, E. and Wrig...

  39. [39]

    Jensen, J. L. W. V. , title =. Acta Mathematica , volume =. 1906 , doi =