Installation

To install dsigma, you can use pip or clone the source code from GitHub.

Automatic Installation

The easiest way to install dsigma is to use pip to install the latest stable version from the Python Package Index (PyPI). This will automatically install the package and all its dependencies.

pip install dsigma

The following packages will be installed alongside dsigma if not installed already.

  • numpy

  • scipy

  • astropy

  • scikit-learn

  • astropy-healpix

  • tqdm

Additionally, for calculating the lens magnification bias, the installation of the Cosmic Microwave Background (CMB) code camb is recommended. However, this is no hard requirement and dsigma will run fine without it.

Manual Installation

You can install dsigma directly from the source code. This allows you to, for example, use versions of dsigma not yet released on PyPI and to change compiler flags for the C code. The following code will install the most recent version of dsigma on GitHub.

git clone https://github.com/johannesulf/dsigma.git
cd dsigma
pip install .

Note dsigma uses C code that, by default, is compiled with the compiler flag -march=native. This may cause an error, for example, on Apple M1 if the Clang compiler is not updated to at least version 15.0. If you don’t want to update Clang, you can deactivate the -march=native compiler flag by editing the file setup.py in the main directory dsigma before installing the code with pip.