Python interface to the 3ptWL-cov covariance code
Project description
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 repository provides a C command-line executable, a static
library, a Cython wrapper (wlcovpy), and small Python examples.
Documentation: 3ptWL-cov documentation
Authors
- Sofia Samario-Nava
ssamario@icf.unam.mx - Alejandro Aviles
aviles@icf.unam.mx
Contributors
- Sadi Ramirez Solano - sadi@icf.unam.mx
- Mario A. Rodriguez-Meza - marioalberto.rodriguezmeza@gmail.com
Install with pip
Install the GSL development library first. On Debian or Ubuntu:
sudo apt-get install build-essential libgsl-dev
Then install the Python interface from PyPI:
python3 -m pip install wlcovpy
This installs the wlcovpy module and compiles its native extension; no
separate make command is needed. To install the unreleased development
version, use python3 -m pip install "git+https://github.com/sadirs/3ptWL-cov.git".
From an existing source checkout, use python3 -m pip install .. The standalone
wlcov command-line executable is built separately with make, as described
below.
Native C build (optional)
Build the standalone executable and static library from a source checkout:
make clean
make PYTHON=python3 all
The Makefile uses gsl-config by default. For a custom GSL installation:
make PYTHON=python3 GSL_INCLUDE=/path/to/gsl/include GSL_LIB=/path/to/gsl/lib all
Native build artifacts:
wlcov: command-line executablelibwlcov.a: static C librarywlcovpy: Cython extension installed bypip install .
Native CLI quick run
./wlcov clsfile=tests/input/Cls_ep2.txt rootDir=Output_quick \
r=0.01 theta1=0.01 theta2=0.012 thetap1=0.011 thetap2=0.013 \
m=0 mp=0 ellmin=1 ellmax=25 ppp=4 Nr=8 rmin=0.00232711 rmax=0.02 \
verbose=0 verbose_log=0
The main input table is supplied with clsfile and must contain two columns:
ell and C_ell.
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": "",
})
try:
model.Run()
integral = model.getIntegral()
finally:
model.clean_all()
See docs/examples/python_wrapper.py, tests/python/, and the main notebook
example in tests/notebooks/example.ipynb for runnable examples. The notebook
saves its figures in tests/notebooks/plots/.
Documentation
The documentation is built with Sphinx:
python3 -m pip install --user -r docs/requirements.txt
cd docs
make html
make man
make latexpdf
Generated outputs:
docs/_build/html/index.htmldocs/_build/man/wlcov.1docs/_build/latex/3ptWL-cov.pdf
Configuration
Main build switches live in Makefile_settings:
USEGSL = 1: required for current GSL Bessel routinesOPENMPMACHINE = 0: set to1for OpenMP buildsADDONSON = 1: required for the current wrapper path
Addon switches live in addons/Makefile_addons_settings:
CLASSLIBON = 1PXDON = 1COSMOLIBON = 0by default
Citation
If you use this program in research that results in publications, please cite Sofia Samario et al., arXiv:2506.19811, and record the code version, compiler, GSL version, Python environment, and runtime configuration used for the analysis.
License
3ptWL-cov is distributed under the MIT license. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file wlcovpy-1.0.1.tar.gz.
File metadata
- Download URL: wlcovpy-1.0.1.tar.gz
- Upload date:
- Size: 71.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17330e73d4c6366d6c0c70718b9d8601ba853bc8376f715397f6d61f2d1c64a0
|
|
| MD5 |
a48db317221269efa8d1ac33fab591ae
|
|
| BLAKE2b-256 |
a66c4c256b9ebed7af5756a0ea7a54773619a2c1c5e58ba7a88b93893d881132
|
Provenance
The following attestation bundles were made for wlcovpy-1.0.1.tar.gz:
Publisher:
publish.yml on sadirs/3ptWL-cov
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wlcovpy-1.0.1.tar.gz -
Subject digest:
17330e73d4c6366d6c0c70718b9d8601ba853bc8376f715397f6d61f2d1c64a0 - Sigstore transparency entry: 1858218912
- Sigstore integration time:
-
Permalink:
sadirs/3ptWL-cov@3078b118de091c89997cea221cdf2f9943fd3616 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/sadirs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3078b118de091c89997cea221cdf2f9943fd3616 -
Trigger Event:
release
-
Statement type: