Ensure combined sky map in alert is using the same GW sky map as alert
Currently there is a bug where the combined sky map included in an alert may be created using the previous alert's GW sky map. This occurs because the combined sky map is generated whenever a new sky map (including new GW sky map) is added to a superevent. Since copying a new GW sky map occurs during the preparation of the alert, there is a race condition between the part the sky map is added and the check of the latest combined sky map in the related external event. This could be fixed by the following:
-
Add the creation the combined sky map as an additional part of preparing an alert, using the exact GW sky map that will be in the alert. Note that this will slightly slow down alerts using combined sky maps. -
Only automatically create combined sky maps from new GW/ext sky maps when after the initial alert has been sent. (i.e. add ADVOK
to https://git.ligo.org/emfollow/gwcelery/-/blob/0ce61e1bc666d8c0f838fff50b0f1631910139b0/gwcelery/tasks/external_triggers.py#L22).