Swiftpack.co - Package - rpoleski/MulensModel


MulensModel is package for modeling microlensing (or μ-lensing) events.

It is still under development. Latest release: 0.3.1

MulensModel can generate a microlensing light curve for a given set of microlensing parameters, fit that light curve to some data, and return a chi2 value. That chi2 can then be input into an arbitrary likelihood function to find the best fit parameters.

A few useful resources:

More will be added soon.


If you want to learn more about microlensing, please visit Microlensing Source website.

Currently, MulensModel supports:

  • Lens Systems: Point Lens, Binary Lens
  • Source Stars: Single source
  • Effects: finite source (1-parameter)

Under Development:

  • Effects: finite source (2-parameter), parallax (satellite, annual)

Future Development:

  • Source Stars: Binary source, xallarap
  • Effects: parallax (topographic)

How to install?

  1. Make sure you have python with astropy package installed.
  2. Download source code - either recent release or current repository using green button above.
  3. Unpack the archive.
  4. Add the path to the unpack directory to the PYTHONPATH, e.g., if you've extracted the archive in your home directory (/home/USER_NAME/) in tcsh:
setenv PYTHONPATH /home/USER_NAME/MulensModel-0.3.1/source\:$PYTHONPATH

in bash:

export PYTHONPATH=/home/USER_NAME/MulensModel-0.3.1/source:$PYTHONPATH

In order to have this command invoked every time you open the terminal, please add this command to ~/.cshrc or ~/.bashrc file.

  1. Go to subdirecotry source/VBBL/ and run make command. If it's not working and you're using Windows, then please run:
gcc -lm -lstdc++ -fPIC -c VBBinaryLensingLibrary.cpp
gcc -Wl,-soname,rapper -shared -o VBBinaryLensingLibrary_wrapper.so VBBinaryLensingLibrary_wrapper.cpp -lm -lstdc++ -fPIC VBBinaryLensingLibrary.o
  1. Repeat above in source/AdaptiveContouring/
  2. Congratulations! You have MulensModel installed fully.


file revised Jan 2018


Stars: 2
Help us keep the lights on


Used By

Total: 0


0.3.1 - Dec 22, 2017

version 0.3.1 - includes Adaptive Contouring and VBBL packages

0.2.1 - Sep 19, 2017

0.2.0 - Sep 16, 2017

0.1.0 - Sep 11, 2017