LCOGT / mop

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

Change gaia_classifier to check for a TNS class #149

Open KKruszynska opened 4 months ago

KKruszynska commented 4 months ago

Currently checkign TNS happens when the target is harvested. The TNS classification changes when a team submits a spectrum or other means of classifying the event. Gaia_classifier should check if the TNS classification changed everytime we re-classify the evens.

KKruszynska commented 4 months ago

This functionality was implemented in the previous version of gaia_classifier.

rachel3834 commented 4 months ago

I've merged your changes to the logic which means we correctly flag events known to TNS now.

I also want to record a discussion we are having locally regarding a high query traffic to the TNS server. They have a (fairly low) maximum number of queries, so our target harvester code is hitting this limit when new events are received. I've added handling for this to improve robustness, but this means that some new targets are created with null entries for TNS name and class - that is, we don't know whether it has an entry for the target or not.

We could go back at a later time and re-run the query but currently MOP doesn't do this, and the flags remain unset.
Alternatively, we may be able to introduce a pause to the code to throttle the query rate to keep it to a rate TNS can manage.

KKruszynska commented 4 months ago

Jon Nation confirmed that there is no bulk query functionality for TNS. I think we need to implement a check if we hit the limit and put the classifier or a harvester to sleep for up to 60 s until we can send a query again, see here.