2D-FFTLog: Efficient computation of real space covariance matrices for galaxy clustering and weak lensing
Xiao Fang, Tim Eifler, Elisabeth Krause
TL;DR
Accurate covariances for two-point functions are essential for cosmological inference but challenging to compute in real space due to double Bessel integrals. The authors present 2D-FFTLog, a two-dimensional generalization of FFTLog, to efficiently compute non-Gaussian real-space covariances for both 3D and projected statistics, with a robust bin-averaging scheme. They validate the method on DES Y3-like and LSST Y1-like surveys, showing agreement with curved-sky covariances and negligible bias in simulated likelihood analyses, while achieving significant speedups ($O(N^2 \log N)$). They release CosmoCov/CosmoLike implementations, enabling rapid covariance calculations for current and future surveys.
Abstract
Accurate covariance matrices for two-point functions are critical for inferring cosmological parameters in likelihood analyses of large-scale structure surveys. Among various approaches to obtaining the covariance, analytic computation is much faster and less noisy than estimation from data or simulations. However, the transform of covariances from Fourier space to real space involves integrals with two Bessel integrals, which are numerically slow and easily affected by numerical uncertainties. Inaccurate covariances may lead to significant errors in the inference of the cosmological parameters. In this paper, we introduce a 2D-FFTLog algorithm for efficient, accurate and numerically stable computation of non-Gaussian real space covariances for both 3D and projected statistics. The 2D-FFTLog algorithm is easily extended to perform real space bin-averaging. We apply the algorithm to the covariances for galaxy clustering and weak lensing for a Dark Energy Survey Year 3-like and a Rubin Observatory's Legacy Survey of Space and Time Year 1-like survey, and demonstrate that for both surveys, our algorithm can produce numerically stable angular bin-averaged covariances with the flat sky approximation, which are sufficiently accurate for inferring cosmological parameters. The code CosmoCov for computing the real space covariances with or without the flat sky approximation is released along with this paper.
