Skip to content
Snippets Groups Projects
Commit 89ffd7c0 authored by Wanting Niu's avatar Wanting Niu :speech_balloon:
Browse files

add the "SubSolarMass" Label to the Injection Events uploaded via Event Uploader

parent d764d12d
No related branches found
No related tags found
Loading
Pipeline #627217 passed with warnings
......@@ -526,13 +526,20 @@ class EventUploader(events.EventProcessor):
# upload event
for attempt in range(1, self.retries + 1):
try:
# add labels
labels = []
if self.is_injection_job:
labels.append('SUBSOLAR_MASS')
if 'apply_snr_optimized_label' in event['favored'] and event['favored']['apply_snr_optimized_label']:
labels.append('SNR_OPTIMIZED') # don't apply the SNR_OPTIMIZED label for skymap optimizer events
resp = self.client.createEvent(
self.gracedb_group,
self.gracedb_pipeline,
'coinc.xml',
filecontents = event['favored']['coinc'],
search = self.gracedb_search,
labels = 'SNR_OPTIMIZED' if 'apply_snr_optimized_label' in event['favored'] and event['favored']['apply_snr_optimized_label'] else None, # don't apply the SNR_OPTIMIZED label for skymap optimizer events
labels = labels if labels else None,
)
except HTTPError as resp:
logger.warning(resp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment