Commit 3b2d17d0 authored by Brandon Piotrzkowski's avatar Brandon Piotrzkowski

Add far threshold for pipelines to be included; Fixes #45

parent 37fedf9e
Pipeline #63219 passed with stages
in 4 minutes and 18 seconds
......@@ -6,6 +6,8 @@
- Inserted words "estimated to be" for FAR statement.
- Added far threshold for pipelines to be included.
## 0.0.28 (2019-04-12)
- Updated macros to state FAR explicitly; no more capping at 1/century.
......
......@@ -42,9 +42,21 @@ def main_dict(gracedb_id, client):
preferred_pipeline = preferred_event['pipeline']
gw_events = event['gw_events']
other_pipelines = []
if preferred_event['group'] == 'CBC':
trials_factor = 5
far_threshold = 1 / (60 * 86400 * trials_factor)
elif preferred_event['group'] == 'Burst':
trials_factor = 4
far_threshold = 1 / (365 * 86400 * trials_factor)
else:
far_threshold = 1 / (30 * 86400)
for gw_event in gw_events:
pipeline = client.event(gw_event).json()['pipeline']
if pipeline not in other_pipelines and pipeline != preferred_pipeline:
pipeline_far = float(client.event(gw_event).json()['far'])
if pipeline not in other_pipelines and pipeline != preferred_pipeline \
and pipeline_far < far_threshold:
other_pipelines.append(pipeline)
voevents = client.voevents(gracedb_id).json()['voevents']
log = client.logs(gracedb_id).json()['log']
......
......@@ -96,7 +96,7 @@
"emobservations": "https://gracedb-dev1.ligo.org/api/events/M2468/emobservation/"
},
"created": "2018-06-28 03:08:36 UTC",
"far": 9.1106993648613e-7,
"far": 9.1106993648613e-9,
"instruments": "H1,L1",
"labels": [],
"search": "MDC",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment