LCOGT / mop

Microlensing Observation Portal
GNU General Public License v3.0
0 stars 7 forks source link

MicrolensingEvent needs to be robust against events without RA/Dec #143

Closed rachel3834 closed 4 months ago

rachel3834 commented 4 months ago

Fit_need_events_PSPL is failing for events such as Gaia23dgu with a TypeError at line 17 in mop_classes.MicrolensingEvent class, where it attempts to convert the target RA to a float in deg. The error claims that the target has None RA.
This shouldn't happen since this is set during the creation of a target.

rachel3834 commented 4 months ago

Weirdly, checking the target page for Gaia23dgu this target has a valid RA and Dec. So it is really not clear where this issue is coming from unless the fitting process happens to run at the same time as the data harvester while it is creating the event from new. Using transaction atomic should have removed that issue though.

rachel3834 commented 4 months ago

It's unsatisfying not to understand why this is happening, but I've added a catch so that the fitting code is more robust in cases of clashes like this.