3ptWL-cov

3ptWL-cov computes the Gaussian contribution to weak-lensing three-point covariance terms in a harmonic basis on the sphere under the Limber approximation. The project provides:

  • a compiled C command-line executable, wlcov;

  • a static library, libwlcov.a;

  • a Cython wrapper, wlcovpy;

  • small Python utilities for scripted covariance workflows.

The documentation is organized in the style of scientific Python projects such as the emcee documentation: start with installation and the quickstart, then move into the user guide, tutorials, API reference, and troubleshooting pages. Where possible, the conventions also follow LSST/DESC scientific-software practice: reproducible commands, explicit environments, lightweight tests, and developer notes for future maintainers.

Basic Usage

After installing GSL, install the Python interface from PyPI:

python3 -m pip install "wlcovpy==1.0.1"

No separate make step is needed for Python use. To build the standalone C executable from a source checkout:

make clean
make PYTHON=python3 all

Run a compact command-line calculation:

./wlcov clsfile=tests/input/Cls_ep2.txt rootDir=Output_quick \
   ellmax=25 ppp=4 Nr=8 rmin=0.00232711 rmax=0.02 \
   verbose=0 verbose_log=0

Or use the Python wrapper:

from wlcovpy import wlcov

model = wlcov(default=False)
model.set({
    "clsfile": "tests/input/Cls_ep2.txt",
    "rootDir": "Output_python",
    "r": 0.01,
    "theta1": 0.01,
    "theta2": 0.012,
    "thetap1": 0.011,
    "thetap2": 0.013,
    "m": 0,
    "mp": 0,
    "ppp": 4,
    "ellmin": 1.0,
    "ellmax": 25.0,
    "Nr": 8,
    "rmin": 0.00232711,
    "rmax": 0.02,
    "numberThreads": 1,
    "verbose": 0,
    "verbose_log": 0,
    "options": "",
})
cputime = model.Run()
model.clean_all()

For a zero-checkout covariance-matrix example, launch the version-controlled notebook in Google Colab:

Open the covariance-matrix tutorial in Google Colab

The notebook installs the published wlcovpy==1.0.1 package and downloads its inputs from the matching v1.0.1 release tag.

How to Use This Guide

If you are installing or running the 3ptWL-cov executable for the first time, read Installation and Quickstart. If you are preparing production runs, read the parameter and output pages before scaling up the integration range. Developers should also read Developer Guide and Troubleshooting and Common Errors, which summarize the validated build path and current caveats.