Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real time modeling is lacking #179

Open
ebachelet opened this issue Aug 6, 2024 · 8 comments
Open

Real time modeling is lacking #179

ebachelet opened this issue Aug 6, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@ebachelet
Copy link
Collaborator

I came across this event that has not be fitted since 22 days...
https://mop.lco.global/targets/42858/
And this one is 18 days ago
https://mop.lco.global/targets/42876/

@rachel3834
Copy link
Contributor

From the logs, the automatic modeling process is hitting the following exception:

Fitting event: OGLE-2024-BLG-0136
FIT: Found 2 datasets and a total of 1364 datapoints to model for event OGLE-2024-BLG-0136
FITTOOLS: established event
pyLIMA found (and eliminate) some bad_data for telescope Tel_1, please check your_telescope.bad_data
FITTOOLS: appended 2 telescopes
ERROR : There is no associated lightcurve in magnitude or flux with this telescopes : Tel_1, add one with telescope.lightcurve = your_data
Job failed: OGLE-2024-BLG-0136

@rachel3834 rachel3834 added the bug Something isn't working label Aug 7, 2024
@ebachelet
Copy link
Collaborator Author

This seems pyLIMA found all data are "bad" for this Tel_1 telescope. Looking inside MOP, I would guess this is g_ZTF datasets that looks indeed kind of bad. A pre_cleaning before pyLIMA might be the way to solve this
image

@rachel3834
Copy link
Contributor

Did you remove the ZTF data from MOP for OGLE-2024-BLG-0134? It does seem to be there now and indeed PyLIMA is able to fit the event happily.

@ebachelet
Copy link
Collaborator Author

LOL no!

@rachel3834
Copy link
Contributor

OK follow-up question: does PyLIMA have an exceptions library that I can import? It would make it easier to catch this specific error instead of having over-broad try-except clauses.

@ebachelet
Copy link
Collaborator Author

I am afraid no.... Might want to raise an issue on this

@rachel3834
Copy link
Contributor

In the meantime, I've added more exception handling which should hopefully intercept this case gracefully, but it is proving hard to reproduce the error.

@rachel3834
Copy link
Contributor

I've found another example of this issue with logging data to prove it: OGLE-2024-BLG-0676

Current time is JD=2460532.347
Timestamp of latest available datapoint is 2460507.76962
Timestamp of latest model is 2460509.93923

When this event is considered for fitting by fit_need_events_PSPL, the logs record:
FIT_NEED_EVENTS: Need to fit OGLE-2024-BLG-0676: False, reason: Up to date model
FIT_NEED_EVENTS: evaluated target OGLE-2024-BLG-0676, 0 out of 100

This decision is made by the MicrolensingTarget.check_need_to_fit, which compares the timestamp of the latest model and that of the latest data and if the model is more recent, assumes that the current model fit is the best possible.

When I force a new fit for this event using fit_event_PSPL, the resulting fitted model is pretty similar to the old one, since there are no newer datapoints to provide further constraints.

In this case I would argue that MOP is doing the right thing and not using CPU cycles to refit events unnecessarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants