Implement an independent subthreshold annotation pipeline
The race condition when annotating sub threshold superevents (see !665 (closed)) is because the _preliminary_alert
task checks for the presence of EM_Selected
label before launching the annotations. This could lead to a race condition since the label may be applied after the subthreshold annotation pipeline is launched i.e., a super-threshold event is added to the superevent post the timeout to launch the subthreshold annotations.
A possible solution is to make the subthreshold annotation pipeline independent i.e., something that runs after a timeout irrespective of labels on the superevent.
The idea is as follows:
- have a separate task
subthreshold_annotations
. This will run aftersubthreshold_annotation_timeout
irrespective of labels on the superevent. - This will copy files over to the superevent based on the preferred event at the time when it runs (same as what is on v0.8.7) and annotate the superevent. In case the superevent has already been annotated, the extra application of labels will not affect it.
- This could also send a private GCN pipeline (see !669 (closed)).
- We need to break the degeneracy between the filenames so that the super-threshold
preliminary_alert
pipeline is not confused by files copied by thepreliminary_alert_subthreshold
- A possible option is to adapt a filename convention like
subthreshold.bayestar.fits.gz
andsubthreshold.em_bright.json
when uploading to the superevent. - When uploading the file to the superevent, these will not be tagged public, so that they don't interfere with the public view of the superevent.
CC @leo-singer
Edited by Deep Chatterjee