Skip to main content

Strong lens modeling package.

Project description

https://badge.fury.io/py/lenstronomy.png https://travis-ci.org/sibirrer/lenstronomy.png?branch=master Documentation Status https://coveralls.io/repos/github/sibirrer/lenstronomy/badge.svg?branch=master https://img.shields.io/badge/license-MIT-blue.svg?style=flat https://img.shields.io/badge/arXiv-1803.09746%20-yellowgreen.svg

lenstronomy is a multi-purpose package to model strong gravitational lenses. The software package is presented in Birrer & Amara 2018 and is based on Birrer et al 2015. lenstronomy finds application in e.g. Birrer et al 2016, Birrer et al 2018 and Shajib et al 2019 for time-delay cosmography and measuring the expansion rate of the universe and Birrer et al 2017 and Gilman et al. 2019 for quantifying lensing substructure to infer dark matter properties.

The development is coordinated on GitHub and contributions are welcome. The documentation of lenstronomy is available at readthedocs.org and the package is distributed over PyPI.

Installation

$ pip install lenstronomy --user

Requirements

To run lens models with elliptical mass distributions, the fastell4py package, originally from Barkana (fastell), is also required and can be cloned from: https://github.com/sibirrer/fastell4py (needs a fortran compiler)

$ sudo apt-get install gfortran
$ git clone https://github.com/sibirrer/fastell4py.git <desired location>
$ cd <desired location>
$ python setup.py install --user

Additional python libraries are e.g. : numpy, scipy, matplotlib astropy, dynesty, pymultinest, pypolychord, nestcheck, CosmoHammer

Modelling Features

  • a variety of analytic lens model profiles

  • various lensing computation tools (lens equation solver, ray-tracing etc)

  • integrated support for multi-lens plane and multi-source plane modelling

  • API to conveniently simulate mock lenses

  • Extended source reconstruction with basis sets (shapelets)

  • numerical options for sub-grid ray-tracing and sub-pixel convolution

  • Particle swarm optimization for parameter fitting

  • MCMC (emcee) and nested sampling (MultiNest, DyPolyChord, or Dynesty)

  • Kinematic modelling (Jeans anisotropy models) of lens deflector galaxy

  • Cosmographic inference tools

  • …and much more

Getting started

The starting guide jupyter notebook leads through the main modules and design features of lenstronomy. The modular design of lenstronomy allows the user to directly access a lot of tools and each module can also be used as stand-alone packages.

Example notebooks

We have made an extension module available at http://github.com/sibirrer/lenstronomy_extensions. You can find simple examle notebooks for various cases. The latest versions of the notebooks should be compatible with the recent pip version of lenstronomy.

Mailing list

You can join the lenstronomy mailing list by signing up on the google groups page.

The email list is meant to provide a communication platform between users and developers. You can ask questions, and suggest new features. New releases will be announced via this mailing list.

If you encounter errors or problems with lenstronomy, please let us know!

Shapelet reconstruction demonstration movies

We provide some examples where a real galaxy has been lensed and then been reconstructed by a shapelet basis set.

Attribution

The design concept of lenstronomy are reported in Birrer & Amara 2018. Please cite this paper whenever you publish results that made use of lenstronomy. Please also cite Birrer et al 2015 when you make use of the lenstronomy work-flow or the Shapelet source reconstruction. Please make sure to cite also the relevant work that was implemented in lenstronomy, as described in the release paper.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lenstronomy-1.2.2.tar.gz (5.8 MB view details)

Uploaded Source

File details

Details for the file lenstronomy-1.2.2.tar.gz.

File metadata

  • Download URL: lenstronomy-1.2.2.tar.gz
  • Upload date:
  • Size: 5.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.6.9

File hashes

Hashes for lenstronomy-1.2.2.tar.gz
Algorithm Hash digest
SHA256 f95da32b07ea4d0a04dd46f5a631650ee6debfbae5221754b01ace209fef5001
MD5 5208a8d395f9ef12c46e88dc83aa7e6a
BLAKE2b-256 6e9b03a0b23cc9f4e1e6e7b521d8f0d5f73ad7788117cf999adc19c8a0da67f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page