OneCovariance is python package (with some C++ for the heavy lifting) for the calculation of the covariance matrix of photometric large-scale structure surveys. It can produce the covariance matrix for all the 2-point statistics used within the Kilo-Degree-Survey (KiDS), that is configuration space statistics, bandpowers and COSEBIs. All these observables are derived from projected Fourier space quantities. The code is flexible enough to read in the ingredients from a harmonic space covariance matrix and produce one of the mentioned statistics (whether these are optimal for the considered case is a different question).
The installation steps, documentation and examples are all provided at onecovariance.readthedocs.io.
For starters you first clone the directory via:
git clone git@github.com:rreischke/OneCovariance.gitor
git clone https://github.com/rreischke/OneCovariance.gitThen navigate to the cloned directory
cd OneCovariance
conda env create -f conda_env.yaml
conda activate cov20_env
pip install .On some Linux servers you will have to install gxx_linux-64 by hand and the installation will not work. This usually shows the following error message in the terminal:
gcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory
If this is the case just install it by typing
conda install -c conda-forge gxx_linux-64and redo the pip installation.
If you do not want to use the conda environment make sure that you have gfortran and gsl installed. Note that there is an issue with pybind11 when using python >= 3.13, so make sure to use a version below that for the moment.
You can install both via conda:
conda install -c conda-forge gfortran
conda install -c conda-forge gsl
conda install -c conda-forge gxx_linux-64
git clone git@github.com:rreischke/OneCovariance.git
cd OneCovariance
pip install .Once you have installed the external package via pip install the code simply runs by using the config.ini where all parameters are stored and explained. Running the script
python covariance.pywill run the code using the settings in the standard configuration file config.ini.
If you use the OneCovariance code, please cite the corresponding paper. In there, you can also find the main equations used in the computation as well as a general review on covariance matrix computation.
