Microlensing Python Notebook Tutorial

Welcome to the microlensing data challenge Python notebook tutorial. Official instructions for the microlensing data challenge can be found at this site . There are two downloads required: the notebook and the data .

Installation: This notebook requires the installation of Python along with Jupyter and three microlensing Python packages listed below. The notebook was written and tested in Python 2.7 on a Mac (OS 10.13).

Why this notebook exists: One of the aims of the microlensing data challenge is to get participation from those outside of the microlensing community on how best to fit models to microlensing data. This notebook aims to provide a starting point for those outside the microlensing community to get involved in the data challenge.

What the code does: The notebook first reads in sample data (from the 2017 microlensing Sagan workshop, not the official microlensing data challenge data). It requires some input best guesses for the microlensing fit parameters and a small grid search region to search around those parameters. A model is generated using the input parameters and the goodness of fit to the data is assessed with a chi-squared fit. Models are generated using three separate microlensing Python packages (pyLIMA, MulensModel, and muLAn). In this tutorial notebook, the best fitting model is determined using a simple grid search over two of the input parameters, and assessed with the lowest chi-squared value.

How to use the notebook: The input parameter guesses and grid search range can be changed for this dataset to see how that affects the best fitting model. For data in the real data challenge, the initial parameter guesses will need to be changed. For a tutorial on how to guess these initial parameters, the 2017 Sagan workshop has a great tutorial , particularly this one in the hands-on sessions. The algorithm to find the best fitting model is one place where users of this notebook can contribute to the microlensing data challenge.

Note about changing input parameters: Changing the initial parameter guesses may throw you way off the answer. Microlensing model fits are very sensitive to incorrect starting values. For this example data, the initial values have been set to the true values (these are known because we are using Sagan workshop sample data).

Good luck!