dsigma is an easy-to-use Python package for measuring gravitational galaxy-galaxy lensing. Using a lensing catalog, it estimates excess surface density around a population of lenses, such as galaxies in the Sloan Digital Sky Survey or the Baryon Oscillation Spectroscopic Survey. It has a flexible API and can utilize data from, DECADE, the Dark Energy Survey (DES), the Kilo-Degree Survey (KiDS), and the Hyper Suprime-Cam (HSC) lensing surveys, among others. With core computations written in C, dsigma is very fast. Additionally, dsigma provides out-of-the-box support for estimating covariances with jackknife resampling and calculating various summary statistics.
- Johannes Lange
- Song Huang
The easiest way to install dsigma is to use pip to install the latest stable version from the Python Package Index (PyPI).
pip install dsigma
Alternatively, you can install the latest development version from GitHub.
pip install git+https://github.com/johannesulf/dsigma
Documentation for dsigma with concept introductions, examples, and API documentation is available on readthedocs.
dsigma is listed in the Astronomy Source Code Library. If you find the code useful in your research, please cite Lange & Huang (2022).
dsigma is licensed under the MIT License.
Generative AI was used to search for potential bugs in the code and to improve the documentation by finding typos and suggesting minor rewrites. No part of the dsigma code itself was written entirely or in parts by AI.

