LSST-nonproject / sims_maf_contrib

Contributed code for MAF (sims_maf)
18 stars 46 forks source link

As about microlensing light curves #83

Closed sylvielsstfr closed 2 years ago

sylvielsstfr commented 3 years ago

Hello,

I am from DESC-LSST collaboration. I would like to use cadence data and MAF to generate some curves for micro-lensing.

I am learning MAF usage by following the examples provided by this sim_maf_contrib.

I have seen the following example that looks good. https://github.com/LSST-nonproject/sims_maf_contrib/blob/master/tutorials/PullLightCurves.ipynb

In addition I see the following example

https://github.com/LSST-nonproject/sims_maf_contrib/blob/master/science/Transients/Microlensing.ipynb

So I am very interrested in the package microlensingMetric that you are probably developping now:

from microlensingMetric import MicrolensingMetric, generateMicrolensingSlicer, microlensing_amplification

I would be interrested in the philosophy of the Metric, Slicer classes inside the microlensingMetric python package that I have not found in this repo.

Perhaps this code is private. Is there typical code in the documentation https://sims-maf.lsst.io/metricList.html which is appropriate for doing such things.

(Perhaps Stackers may have to be used.).

Thanks for your help and advices.

Sylvie

yoachim commented 3 years ago

Hi @sylvielsstfr, sorry it took me a while to respond, my github emails get filtered. Here's where the microlensing code is: https://github.com/LSST-nonproject/sims_maf_contrib/blob/master/mafContrib/microlensingMetric.py

The general idea is that generateMicrolensingSlicer makes a population of microlensing events with a distribution of crossing times, impact factors, and realistic distribution on the sky. When you run MAF, the MicrolensingMetric then goes to each microlening event, generates the light curve LSST would have seen, and checks to see if it passes a detection criteria.

We have a similar setup for tidal disruption events, but we made the metric slightly more complicated so it can check multiple detection criteria: https://github.com/LSST-nonproject/sims_maf_contrib/blob/master/mafContrib/TDEsPopMetric.py