Skip to content

software package for lens model reconstruction of imaging data

License

Notifications You must be signed in to change notification settings

guoxiaowhu/lenstronomy

 
 

Repository files navigation

lenstronomy - gravitational lensing software package

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

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 and Birrer et al 2018 for time-delay cosmography and measuring the expansion rate of the universe and Birrer et al 2017 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)

Additional python libraries:

  • CosmoHammer (through PyPi)
  • astropy
  • standard python libraries (numpy, scipy)

Modelling Features

  • a variety of lens models to use in arbitrary superposition
  • lens equation solver
  • multi-plane ray-tracing
  • Extended source reconstruction with basis sets (shapelets) and analytic light profiles
  • Point sources
  • numerical options for sub-grid ray-tracing and sub-pixel convolution
  • non-linear line-of-sight description
  • iterative point spread function reconstruction
  • linear and non-linear optimization modules
  • Pre-defined plotting and illustration routines
  • Particle swarm optimization for parameter fitting
  • MCMC (emcee from CosmoHammer) for parameter inferences
  • Kinematic modelling
  • Cosmographic inference tools

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.

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.

About

software package for lens model reconstruction of imaging data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%