- MulensModel is package for modeling microlensing (or μ-lensing)
It is still under development. Latest release: 1.4.0
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:
- Basic usage tutorial,
- Fitting tutorial,
- Microlensing parallax fitting tutorial,
- Examples on how to use the code:
- Example 01 -- plot simple point-source/point-lens (PSPL) model and model with planetary lens,
- Example 02 -- fit PSPL model to the data using scipy.optimize.minimize(),
- Example 03 -- define PSPL model using physical properties and plot the resulting magnification curve,
- Example 04 -- calculate the Einstein ring size for a grid of lens masses and distances,
- Example 05 -- plot multiple datasets for a single model, plot the residuals, and do this both in magnitude and magnification spaces,
- Example 06 -- fit parallax model using EMCEE,
- Example 07 -- fit parallax model using MultiNest,
- Example 08 -- shows how to fit simulated WFIRST light curve with planetary model.
- Instructions on getting satellite positions
More will be added soon.
Documentation includes description of input and output of very function.
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), parallax (satellite & annual), binary lens orbital motion, different parametrizations of microlensing models.
Need more? Open an issue or send us an e-mail.
How to install?
Download the source code and run:
python setup.py install
MulensModel requires some standard packages plus astropy package. To make sure that you have everything that's needed, just run:
pip install -r requirements.txt
If you have any problems, please contact the authors and we will try to help.
file revised July 2018
Help us keep the lights on
v1.4.0 - Jul 14, 2018
v1.3.0 - Jun 21, 2018
chi2 calculated in flux space as default, tabulated coefficients for FSPL models, Skowron and Gould 2012 as default method for binary lens polynomial root solving
v1.2.0 - May 2, 2018
gradient of chi^2 for PSPL events
v1.1.0 - Mar 31, 2018
orbital motion, additional input file format in Horizons, improved BLPS calculations
v1.0.0 - Mar 1, 2018
First official release - Mar 1st 2018.