rpoleski / MulensModel

Microlensing Modelling package
https://rpoleski.github.io/MulensModel/
Other
53 stars 16 forks source link

Pyplot interactive output figure needed #140

Open wyrzykow opened 1 month ago

wyrzykow commented 1 month ago

Interactive plot as an output figure from modelling is needed. We use MulensModel in BHTOM service (http://bhtom.space) for quick-look models and it would be useful to interact with the output figure, both in the light curve and residuals. image

rpoleski commented 1 month ago

I would say there are 2 approaches:

  1. Allow plotly instead of pyplot in various plotting functions in MM.
  2. Just make an example that calls: Model.get_lc(), Event.fits[].scale_fluxes(), and Event.fits[].get_residuals() to calculate model, scaled datasets, and residuals, respectively.

First one will be definitely more time-consuming to implement. Any comments?

rpoleski commented 1 month ago

@mjmroz, do you have an example that you could share?

mjmroz commented 1 month ago

Of course, I have Plotly codes for everything: light curve with residuals and cumulative chi2, trajectory, and even some animations of both :) . I wrote them gradually, so they are a bit messy, but I can prepare a clean example in free time. I can also work on allowing Plotly in MM or build an additional visualization tool with more options than currently available in MM.

rpoleski commented 1 month ago

@mjmroz Please add a simple plot of a data and model in one subplot and residuals in another subplot.