Robust determination of external events in superevents.py
search=MDC
external events start with M, same as GW events.
The logic in this line: https://git.ligo.org/emfollow/gwcelery/-/blob/main/gwcelery/tasks/superevents.py#L393 should take account of that. Else it gives errors like this when both GW and EM triggers are present in an MS superevent.
Traceback (most recent call last):
File "/home/emfollow-playground/.local/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
File "/home/emfollow-playground/.local/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/emfollow-playground/.local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/home/emfollow-playground/.local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/emfollow-playground/.local/lib/python3.9/site-packages/flask_caching/__init__.py", line 404, in decorated_function
rv = self._call_fn(f, *args, **kwargs)
File "/home/emfollow-playground/.local/lib/python3.9/site-packages/flask_caching/__init__.py", line 180, in _call_fn
return ensure_sync(fn)(*args, **kwargs)
File "/home/emfollow-playground/.local/lib/python3.9/site-packages/gwcelery/views.py", line 138, in typeahead_event_id
results = [dict(r, snr=superevents.get_snr(r)) for r in results
File "/home/emfollow-playground/.local/lib/python3.9/site-packages/gwcelery/views.py", line 139, in <listcomp>
if superevents.is_complete(r)]
File "/home/emfollow-playground/.local/lib/python3.9/site-packages/gwcelery/tasks/superevents.py", line 438, in is_complete
required_labels = REQUIRED_LABELS_BY_GROUP[group]
KeyError: 'external'