{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "ElM1_WkJMx97" }, "source": [ "\n", "\n", "# Single Lens Fitting & Pipelines\n", "\n", "
Try playing with the parallax (\"pi_E_N\", \"pi_E_E\") and finite source (\"rho\")parameters and see how they change your magnification model.
\n", "Note. This is not an interactive plot. You have to run the cell again after changing the values (or moving the slider, on Colab).
\n", "Extend the cell below by adding parallax parameters (pi_E_E, pi_E_N) and plotting the resulting model so you can see how higher-order terms perturb the fit.
\n", "Test out a fit of a subsample of the EWS data, by running the following 2 cells.
\n", "Edit mulens_neglogP_function() to use a Gaussian prior to constrain the blend flux, if it is below 0; use a piecewise prior combining:
\n", "If everything is working, try adding parallax to model in the EWS event processing function.
Increase the number of events you are testing on (N) so that we can do some more robust benchmarking. You should aim for a number of events that means the above cells takes about 5 minutes to run.
Test how different values of processes in the Pool() function affect your batch fitting time.
\n", "Try using 1, 2, and maybe mp.cpu_count()` if you're on your local runtime.
\n", "What's the fastest? What's the most efficient?
Use the more efficient method (serial or parallel) to process the full season of EWS data.
\n", "Plot histograms of the resulting parameter distributions (e.g., tE, u0, etc.).
\n", "Look for trends and outliers.
Write an algorithm to estimate $t_0$ for microlensing events. Keep it simple. Keep it efficient. The rest of your fit may depend on it.
| \n", " | event_id | \n", "lc_number | \n", "N | \n", "Delta chi2 | \n", "
|---|---|---|---|---|
| 0 | \n", "ulwdc1_005 | \n", "5 | \n", "117.0 | \n", "36836.2 | \n", "
| 1 | \n", "ulwdc1_017 | \n", "17 | \n", "1361.0 | \n", "397992.0 | \n", "
| 2 | \n", "ulwdc1_021 | \n", "21 | \n", "1014.0 | \n", "253501.0 | \n", "
| 3 | \n", "ulwdc1_022 | \n", "22 | \n", "330.0 | \n", "27108.2 | \n", "
| 4 | \n", "ulwdc1_029 | \n", "29 | \n", "3108.0 | \n", "1991220.0 | \n", "
| \n", " | event_id | \n", "lc_file_path_W149 | \n", "lc_s3_uri | \n", "
|---|---|---|---|
| 0 | \n", "ulwdc1_005 | \n", "data-challenge-1/lc/ulwdc1_005_W149.txt | \n", "s3://rmdc26-data-public/2018-test/ulwdc1_005.dat | \n", "
| 1 | \n", "ulwdc1_017 | \n", "data-challenge-1/lc/ulwdc1_017_W149.txt | \n", "s3://rmdc26-data-public/2018-test/ulwdc1_017.dat | \n", "
| 2 | \n", "ulwdc1_021 | \n", "data-challenge-1/lc/ulwdc1_021_W149.txt | \n", "s3://rmdc26-data-public/2018-test/ulwdc1_021.dat | \n", "
| 3 | \n", "ulwdc1_022 | \n", "data-challenge-1/lc/ulwdc1_022_W149.txt | \n", "s3://rmdc26-data-public/2018-test/ulwdc1_022.dat | \n", "
| 4 | \n", "ulwdc1_029 | \n", "data-challenge-1/lc/ulwdc1_029_W149.txt | \n", "s3://rmdc26-data-public/2018-test/ulwdc1_029.dat | \n", "
| \n", " | Event_name | \n", "Event_number | \n", "RA_(deg) | \n", "Dec_(deg) | \n", "Distance | \n", "A_W149 | \n", "sigma_A_W149 | \n", "A_Z087 | \n", "sigma_A_Z087 | \n", "
|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "ulwdc1_001 | \n", "1 | \n", "269.165 | \n", "-29.0207 | \n", "8.18 | \n", "0.73 | \n", "0.01 | \n", "1.41 | \n", "0.01 | \n", "
| 1 | \n", "ulwdc1_002 | \n", "2 | \n", "269.959 | \n", "-30.1918 | \n", "8.09 | \n", "0.49 | \n", "0.01 | \n", "0.95 | \n", "0.01 | \n", "
| 2 | \n", "ulwdc1_003 | \n", "3 | \n", "269.100 | \n", "-29.0983 | \n", "8.18 | \n", "0.73 | \n", "0.01 | \n", "1.41 | \n", "0.01 | \n", "
| 3 | \n", "ulwdc1_004 | \n", "4 | \n", "268.036 | \n", "-28.3744 | \n", "8.25 | \n", "1.35 | \n", "0.07 | \n", "2.60 | \n", "0.14 | \n", "
| 4 | \n", "ulwdc1_005 | \n", "5 | \n", "269.319 | \n", "-29.0889 | \n", "8.18 | \n", "0.73 | \n", "0.01 | \n", "1.41 | \n", "0.01 | \n", "
Perform FSPL on the provided simulated Roman single-lens events.
\n", "Note. Don't forget to save your best fit parameters for later inspection and to add parallax to the model.
Make overlayed histograms of the true parameters distributions and your best-fit parameter distributions to evaluate the sucess of your algoryhthms.
\n", "