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
- 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 numpy conda activate lt_env
>>> import lenstool
On Ubuntu, you can also use the command apt-get from the command line.
apt-get install lenstool
On Mac OSX, you can use Macports (DEPRECATED)
sudo port install lenstool
On Windows you can use Cygwin, following the procedure described here.
Please note the following dependencies
- CFITSIO: [cfitsio3280.tar.gz] version must be at least 2.510.
- GSL: [gsl-1.9.tar.gz]
- WCSTOOLS (until version 7): [wcstools-3.8.4.tar.gz]
- WCSLIB (since version 8): [https://www.atnf.csiro.au/people/Mark.Calabretta/WCS/]
- LIBZMQ and CPPZMQ (until version 7): [https://github.com/zeromq/cppzmq#build-instructions]
- PGPLOT (deprecated): [http://www.astro.caltech.edu/~tjp/pgplot/]
They can be installed with the package managers.
Source Install¶
If you want to install a branch 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
conda create -n lenstool_env -c conda-forge wcslib cfitsio python astropy numpy gsl conda activate lenstool_env
Then, you can clone the lenstool repository and checkout the branch you are looking for using the commands
git clone https://git-cral.univ-lyon1.fr/lenstool/lenstool cd lenstool git checkout <name of the branch>
Finally, you can build and install lenstool with the commands
./configure --prefix=$CONDA_PREFIX --with-cfitsio-prefix=$CONDA_PREFIX --with-wcslib-include-path=$CONDA_PREFIX/include/wcslib --with-wcslib-lib-path=$CONDA_PREFIX/lib --with-gsl-prefix=$CONDA_PREFIX make -j make install python3 -m pip install -vv --no-deps --ignore-installed .
Since version 6.8, Histogram and Histogram2D tools are not anymore compiled by default. You need to specify the option --with-pgplot to compile them. These tools also depend on X11 development libraries and fortran compiler, so you will have to install them before installing lenstool.
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.inNotes:
- For Mac Users, you need to previously install XCode and the Command Line Tools.
Older versions¶
- Source distributions
- lenstool-6.8.1.tar.gz
- lenstool_v6.7.1.tar.gz
- lenstool-6.5.tar.gz
- Compiled versions
- lenstool-7.1-macosx-10.13.zip
- lenstool-7.1-linux64.zip
- lenstool.maverick.6.8.zip
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¶
- LenstoolManual -- Lenstool On Line Manual becoming the reference (not fully complete yet)
- 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.ipynb)- A notebook prepared by Ester Amou Loumagne to illustrate the use of the Python wrapper
Lenstool Papers¶
Papers using lenstool to model the mass distribution of massive clusters (not exhaustive)
- Abell 68 (z=0.25) Richard et al 2007 Download here the [a68.tar.gz A68 model]
- Abell 370 (z=0.37) Richard et al. 2010a Download here the [a370.tar.gz A370 model]
- Abell 1689 (z=0.184) Limousin et al 2007 Download here the [a1689.tar.gz A1689 model]
- Abell 1703 (z=0.28) Limousin et al 2008 Richard et al. 2009
- Abell 1835 (z=0.25) & AC114 (z=0.31) Richard et al 2006
- Abell 2218 (z=0.175) Kneib et al 1996
- MS0451 (z=0.55) Borys et al. 2004 Download here the [ms0451.tar.gz MS0451 model]
- 10 massive clusters Smith et al 2005
- 8 wellknown massive clusters: Richard et al 2008
- 20 LoCuSS clusters (10 new) Richard et al. 2010b Download here the [a1835.tar.gz A1835 model][a2218.tar.gz A2218 model][a2219.tar.gz A2219 model][a2390.tar.gz A2390 model][a2204model.tar.gz A2204 model][a521model.tar.gz A521/RXJ0454 model][a773model.tar.gz A773 model]
- 17 massive clusters Richard et al. 2011
----</pre
Finally, you can compile and install lenstool using the commands