RascalC: Fast Estimation of Galaxy Covariance Matrices

Overview

RascalC is a code to quickly estimate covariance matrices for two- or three-point galaxy correlation functions, written in C++ and Python. Given an input set of random particle locations and a two-point correlation function (or input set of galaxy positions), RascalC produces an estimate of the associated covariance for a given binning strategy, with non-Gaussianities approximated by a ‘shot-noise-rescaling’ parameter. For the 2PCF, the rescaling parameter can be calibrated by dividing the particles into jackknife regions and comparing sample to theoretical jackknife covariance. RascalC can also be used to compute Legendre-binned covariances and cross-covariances between different two-point correlation functions.

The main estimators are described in O’Connell et al. 2016, O’Connell & Eisenstein 2018, Philcox et al. 2020 and Philcox & Eisenstein 2019 with the third and fourth papers discussing the new algorithms and C++ implementation. Rashkovetskyi et al 2023 is dedicated to applications to DESI and updated validation techniques. Rashkovetskyi et al 2025 introduces a new mode for Legendre-binned covariances and presents an extended validation using DESI DR1 mocks. These two papers are combined (with repetitions eliminated) in Chapter 2 of Rashkovetskyi 2025 dissertation. RascalC was also used in Philcox & Eisenstein 2020 to compute the covariance of configuration-space power spectrum estimators.

The source code is publicly available on Github and builds upon the Python package Rascal. RascalC is now also available as a Python package (see Package installation). For general usage, we provide Fundamentals and Practical examples; you can also refer to legacy-mode/command-line Tutorial: Aperiodic Data and Jackknives and Tutorial: Periodic Data and Legendre Multipoles.

For any queries regarding the code please contact Michael ‘Misha’ Rashkovetskyi.