Project

General

Profile

LENSTOOL

A gravitational lensing software for modeling mass distribution of galaxies and clusters (strong and weak regime).

  • Credits: People who contribute on this project (in chronological order): Jean-Paul Kneib, Henri Bonnet, Ghyslain Golse, David Sand, Eric Jullo, Phil Marshall, Julien Zoubian, Mathilde Jauzac, Johan Richard, Benjamin ClĂ©ment, Tomas Verdugo, Soniya Sharma, Benjamin Beauchesne, Joseph Allingham
  • Reference papers: Kneib et al 1996, Jullo et al 2007, Jullo & Kneib 2009

Installation

Starting from version 8, you can install Lenstool using conda on Linux, Mac OSX or the Windows WSL Ubuntu system. This will give you access to the Python wrapper

conda create -n lenstool_env -c conda-forge lenstool astropy matplotlib ipykernel ipywidgets ipyevents
conda activate lenstool_env

The last 3 packages on the command line above allow you to use Lenstool in a Jupyter notebook.

Once installed, you should be able to use Lenstool in a Python environment

>>> import lenstool

Graphical User Interface

You can use the Ginga viewer in a Jupyter notebook (see example here). To install it

conda install ginga

You can also try the VisuaLens library in a Jupyter notebook

pip install visualens

Source Install

If you want to install specific branch of Lenstool repository different from the master branch, you will have to install it from the source code. For this, we recommend to use a virtual environment, such as conda. The procedure is described here.

On Windows you can use Cygwin, following the procedure described here.

If you want to use the generalized NFW profile, you need to prepare the lenstool.tab lookup table with this command

echo "0.01 1.70 0.01 0.01 30.0 1.01 " > config.in
lenstool_tab ./config.in

Older versions

Please, contact Eric Jullo (eric.jullo AT lam.fr), if you want to provide a compiled version with another operating system. Compiled version have been compiled with option --disable-shared.

Email-list:

lenstool AT googlegroups.com

To be added to the mailing list contact Jean-Paul Kneib: jean-paul.kneib AT lam.fr

Lenstool documentation

  • ReadTheDoc documentation -- Lenstool On Line Manual becoming the reference
  • LenstoolManual -- Lenstool On Line Manual becoming the reference (outdated)
  • lenstool.pdf -- Old manual, also available through the source code distribution
  • lenstool_dummies.pdf - A manual written by Mike "McCourt" a student discovering lenstool (Oct 2006).
  • GuideForJupyter.html (GuideForJupyter_v2.ipynb)- A notebook prepared by Ester Amou Loumagne to illustrate the use of the Python wrapper. Note that to be able to run the notebook, you need to have lenstool installed in the JupyterHub kernel. The procedure to do so is described here
  • Lenstool_WSL_VisualStudioCode.pdf - A manual written by Kyde Bellon, describing how to install Lenstool and DS9 from conda in Windows/WSL, as well as interfacing with Visual Studio Code.

Lenstool Papers

Papers using lenstool to model the mass distribution of massive clusters (not exhaustive)

Finally, you can compile and install lenstool using the commands