Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
emfollow
ligo-followup-advocate
Commits
3b2d17d0
Commit
3b2d17d0
authored
May 15, 2019
by
Brandon Piotrzkowski
Browse files
Add far threshold for pipelines to be included; Fixes
#45
parent
37fedf9e
Pipeline
#63224
passed with stages
in 4 minutes and 41 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
CHANGES.md
View file @
3b2d17d0
...
...
@@ -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.
...
...
ligo/followup_advocate/__init__.py
View file @
3b2d17d0
...
...
@@ -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'
]
...
...
ligo/followup_advocate/test/data/M2468/event.json
View file @
3b2d17d0
...
...
@@ -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"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment