@@ -93,8 +93,7 @@ def format_ontime_events_uml(events, event_mjd):
93
93
'localization' :{
94
94
'ra' : round (np .rad2deg (event ['ra' ]), 2 ),
95
95
'dec' : round (np .rad2deg (event ['dec' ]), 2 ),
96
- "uncertainty_shape" : "circle" ,
97
- 'ra_uncertainty' : [round (np .rad2deg (event ['sigma' ]* 2.145966 ),2 )],
96
+ 'ra_dec_error' : round (np .rad2deg (event ['sigma' ]* 2.145966 ),2 ),
98
97
"containment_probability" : 0.9 ,
99
98
"systematic_included" : False
100
99
},
@@ -114,8 +113,7 @@ def format_ontime_events_llama(events):
114
113
'localization' :{
115
114
'ra' : round (event ['ra' ], 2 ),
116
115
'dec' : round (event ['dec' ], 2 ),
117
- "uncertainty_shape" : "circle" ,
118
- 'ra_uncertainty' : [round (np .rad2deg (np .deg2rad (event ['sigma' ])* 2.145966 ),3 )],
116
+ 'ra_dec_error' : round (np .rad2deg (np .deg2rad (event ['sigma' ])* 2.145966 ),2 ),
119
117
"containment_probability" : 0.9 ,
120
118
"systematic_included" : False
121
119
},
@@ -184,10 +182,10 @@ def parse_notice(record, wait_for_llama=False, heartbeat=False):
184
182
if int (params ['Significant' ])== 0 :
185
183
subthreshold = True
186
184
logger .warning ('low-significance alert found. ' )
187
- if params ['Group' ] == 'Burst' :
185
+ if params ['Group' ] == 'Burst' or params [ "Pipeline" ] == 'CWB' :
188
186
wait_for_llama = False
189
187
m = 'Significant' if not subthreshold else 'Subthreshold'
190
- logger .warning ('{} burst alert found. ' .format (m ))
188
+ logger .warning ('{} burst or CWB alert found. ' .format (m ))
191
189
if len (params ['Instruments' ].split (',' ))== 1 :
192
190
#wait_for_llama = False
193
191
logger .warning ('One detector event found. ' )
@@ -198,7 +196,7 @@ def parse_notice(record, wait_for_llama=False, heartbeat=False):
198
196
return
199
197
200
198
collected_results = {}
201
- collected_results ["$schema" ]= "https://gcn.nasa.gov/schema/v3 .0.0/gcn/notices/icecube/lvk_nu_track_search.schema.json"
199
+ collected_results ["$schema" ]= "https://gcn.nasa.gov/schema/v4 .0.0/gcn/notices/icecube/lvk_nu_track_search.schema.json"
202
200
collected_results ["type" ]= "IceCube LVK Alert Nu Track Search"
203
201
204
202
eventtime = record .find ('.//ISOTime' ).text
@@ -304,11 +302,14 @@ def parse_notice(record, wait_for_llama=False, heartbeat=False):
304
302
else :
305
303
logger .warning ('Both analyses not finished after {:.0f} min wait.' .format (max_wait ))
306
304
logger .warning ('Not sending GCN.' )
305
+
307
306
if record .attrib ['role' ]== 'observation' and not heartbeat :
308
- err_msg = '--missing_llama=True --missing_uml=True' if not subthreshold else '--missing_llama=True'
307
+ err_msg = ['/home/jthwaites/private/make_call.py' , '--troubleshoot_gcn=True' ,
308
+ '--missing_llama=True' ]
309
+ if not subthreshold : err_msg .append ('--missing_uml=True' )
310
+
309
311
try :
310
- subprocess .call (['/home/jthwaites/private/make_call.py' ,
311
- '--troubleshoot_gcn=True' , err_msg ])
312
+ subprocess .call (err_msg )
312
313
except :
313
314
logger .warning ('Failed to send alert to shifters: Issue finding both results. ' )
314
315
return
@@ -482,7 +483,7 @@ def parse_notice(record, wait_for_llama=False, heartbeat=False):
482
483
my_key = f .readline ()
483
484
484
485
if not subthreshold :
485
- channels = ['#gwnu-heartbeat' , '#gwnu' , '#alerts ' ]
486
+ channels = ['#gwnu-heartbeat' , '#alerts' ] #, '#gwnu ']
486
487
else :
487
488
channels = ['#gwnu-heartbeat' ]
488
489
for channel in channels :
@@ -516,6 +517,23 @@ def parse_notice(record, wait_for_llama=False, heartbeat=False):
516
517
logger .info ('Sent alert to ROC for p<0.01' )
517
518
except :
518
519
logger .warning ('Failed to send email/SMS notification.' )
520
+
521
+ # try:
522
+ # if params['Group'] == 'Burst':
523
+ # merger_type = 'Burst'
524
+ # else:
525
+ # k = ['BNS','NSBH','BBH']
526
+ # probs = {j: float(params[j]) for j in k}
527
+ # merger_type = max(zip(probs.values(), probs.keys()))[1]
528
+ # except:
529
+ # logger.info('Could not determine type of event')
530
+ # merger_type = None
531
+
532
+ # try:
533
+ # subprocess.call(['/home/jthwaites/private/make_call.py', f'--type={merger_type}', '--call_anyway'])
534
+ # except Exception as e:
535
+ # logger.warning('Call for p<0.01 failed.')
536
+
519
537
else :
520
538
logger .info ('p>0.01: no email/sms sent' )
521
539
else :
0 commit comments