Skip to content

Commit

Permalink
printing mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
KaraMelih committed Aug 15, 2024
1 parent cc92ea1 commit 113eee3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion snews_cs/cs_alert_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ def get_cs_alert_schema(self, data, which_cache_to_use='main'):
"""
id = self.id_format(len(data['detector_names']))
alert_type = "TEST "+ data['alert_type'] if which_cache_to_use=='test' else data['alert_type']
try:
far = f"Would happen every {data['false_alarm_prob']:.2e} year"
except:
far = data['false_alarm_prob']
return {"_id": id,
"alert_type":alert_type,
"server_tag": data['server_tag'],
"False Alarm Prob": f"Would happen every {data['false_alarm_prob']:.2e} year",
"False Alarm Prob": far,
"detector_names": data['detector_names'],
"sent_time": id.split(' ')[1],
"p_values": data['p_vals'],
Expand Down

0 comments on commit 113eee3

Please sign in to comment.