Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
lscsoft
bilby
Commits
8b595c2b
Commit
8b595c2b
authored
Jun 17, 2019
by
Sylvia Biscoveanu
Committed by
Moritz Huebner
Jun 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add catch for empty log_evidence_err array
parent
facebc86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
bilby/core/result.py
bilby/core/result.py
+4
-1
No files found.
bilby/core/result.py
View file @
8b595c2b
...
...
@@ -1336,7 +1336,10 @@ class ResultList(list):
else
:
result
.
log_bayes_factor
=
result
.
log_evidence
-
result
.
log_noise_evidence
log_errs
=
[
res
.
log_evidence_err
for
res
in
self
if
np
.
isfinite
(
res
.
log_evidence_err
)]
result
.
log_evidence_err
=
logsumexp
(
2
*
np
.
array
(
log_errs
),
b
=
1.
/
len
(
self
))
if
len
(
log_errs
)
>
0
:
result
.
log_evidence_err
=
logsumexp
(
2
*
np
.
array
(
log_errs
),
b
=
1.
/
len
(
self
))
else
:
result
.
log_evidence_err
=
np
.
nan
result_weights
=
np
.
exp
(
log_evidences
-
np
.
max
(
log_evidences
))
posteriors
=
[]
for
res
,
frac
in
zip
(
self
,
result_weights
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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