WIP: New EM_COINC specific circulars upon RAVEN coincidences; Fixes #12
I just did the first step on the circular template to create this merge request. work needed:
-
when we pull down information about a superevent, it looks at the labels for the superevent. the label 'EM_COINC' must be there.
-
for the superevent, there's a list of em_events found under gracedb.get_superevent(superevent_id)['em_events']
-
We would need to pull up that em_event and check whether it is a SNEWS Supernova neutrino or a GRB from Fermi or Swift.
-
If it is a SNEWS Supernova, the text template should be: "A search performed by the RAVEN pipeline found a temporal coincidence between (Superevent) and a SNEWS neutrino (external trigger)." For now, this is very basic but we'll start here.
-
If it is a GRB, the text template should be: "A search performed by the RAVEN pipeline found a temporal coincidence between (Superevent) and a GRB (external trigger). The false alarm rate for the time coincidence is (time coincidence FAR written in natural language; see the initial template for reference)."
To get the time coincidence FAR you have to parse the superevent log for the message: message = "RAVEN: Temporal coincidence with external trigger {1} gives a coincident FAR = {2} Hz".format(exttrig.graceid, exttrig.graceid, far)
If the combined skymap is also available, add a sentence in that says "A combined skymap is also available: (link to combined skymap). The false alarm rate for the space-time coincidence is (space-time coincidence FAR written in natural language)"
To get the spatio-temporal FAR you have to parse the superevent log for the message: message = "RAVEN: Spatiotemporal coincidence with external trigger {1} gives a coincident FAR = {2} Hz".format(exttrig.graceid, exttrig.graceid, far)