Cluster Toolkit Documentation

Cluster Toolkit is a Python package specifically built for calculating weak lensing signals from galaxy clusters and cluster cosmology. It consists of a Python front end wrapped around a well optimized back end in C, merged with cffi. The core functionality of the package includes:

  • 3D density functions \(\rho(r)\)
  • 3D correlation functions \(\xi(r)\)
  • Halo bias models \(b(M)\)
  • Projected density and differential profiles \(\Sigma(R)\) and \(\Delta\Sigma\)
  • Radially averaged profiles \(\overline{\Delta\Sigma}\)
  • Boost factor models \(\mathcal{B} = (1-f_{\rm cl})^{-1}\)
  • Miscentering effects on projected profiles \(R_{\rm mis}\)
  • Halo mass functions \(\frac{dn}{dM}(M,z)\)
  • Mass-concentration relations \(M-c\)
  • Sunyaev-Zel’dovich (SZ) cluster signals \(Y_{SZ}\) (in development)
  • Cluster magnification \(\kappa(\theta)\) and shear profiles \(\gamma(\theta)\) (in development)

The source code is publically available at


Unless stated otherwise, all distances are assumed to be \({\rm Mpc}/h\) comoving and masses \({\rm M}_\odot/h\). Furthermore, power spectra \(P(k)\) must be in units of \(({\rm Mpc}/h)^3\) with wavenumber \(k\) in units of \(h/{\rm Mpc}\).