skip to navigation
skip to content

lenstools 1.0

Toolkit for Weak Gravitational Lensing analysis

Welcome to LensTools!

This python package collects together a suite of widely used analysis tools in Weak Gravitational Lensing. For more information visit the project official page. If you make use of this code in your work, please cite it!



  • Plot Gaussian prediction for peak histograms (Bond et. al. 1987)
  • Make reduced shear maps and catalogs in lenstools.raytracing
  • Better handling of random seeds in raytracing
  • Measure equilateral and folded bispectrum of scalar images (kappa,cmb)
  • Introduced CMBTemperatureMap class
  • CMB lensing potential reconstructions with quadratic TT estimator (wrapped around quicklens)
  • Handle neutrino parameters in pipeline book keeping
  • Introduced Gadget2SnapshotNu class for N-body outputs with neutrino effects


  • RayTracer can now perform line of sight integrations to approximate kappa (Born, lens-lens and geodesic perturbation) and omega (lens-lens), without full raytracing
  • cutPlanes can now handle snapshots in FastPM format
  • If snapshots are provided in light cone projections, LensTools can do plane cutting, raytracing and LOS integrations in a single script
  • Fit multiple observations with the same FisherAnalysis


  • ShearCatalog allows to re-bin galaxies according to redshift
  • Introduced a SquareMaxtrix class (inherits from Ensemble) for square matrix operations, with column name support
  • Protect nodes in a SimulationBatch to call forbidden methods


  • Database class for local/remote SQL databases
  • Gadget2SnapshotPipe class allows to combine Gadget2 and lenstools.planes via named pipes
  • Improvements in pipeline deployment


  • Weak lensing pipeline functionalities
  • Measure 2pcf of convergence maps with hankel transforms
  • Moved Limber module under lenstools.simulations
  • Dedicated module for Fast Fourier Transforms
  • Ensemble is now a sub-class of pandas.DataFrame

  • New operations in Ensemble: bootstrap, readall, shuffle
  • Ensemble mean is automatically recomputed when re–assigning data


Beta release

File Type Py Version Uploaded on Size
lenstools-1.0.tar.gz (md5) Source 2017-05-30 246KB