Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gregory Ashton
PyFstat
Commits
61607088
Commit
61607088
authored
Dec 13, 2016
by
Gregory Ashton
Browse files
Add check to ignore det stat plot if all det stat values are the same
parent
f770b66c
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyfstat.py
View file @
61607088
...
...
@@ -1458,13 +1458,23 @@ class MCMCSearch(BaseSearchClass):
lnl
=
sampler
.
lnlikelihood
[
temp
,
:,
:]
if
burnin_idx
and
add_det_stat_burnin
:
burn_in_vals
=
lnl
[:,
:
burnin_idx
].
flatten
()
axes
[
-
1
].
hist
(
burn_in_vals
[
~
np
.
isnan
(
burn_in_vals
)],
bins
=
50
,
histtype
=
'step'
,
color
=
'r'
)
try
:
axes
[
-
1
].
hist
(
burn_in_vals
[
~
np
.
isnan
(
burn_in_vals
)],
bins
=
50
,
histtype
=
'step'
,
color
=
'r'
)
except
ValueError
:
logging
.
info
(
'Det. Stat. hist failed, most likely all '
'values where the same'
)
pass
else
:
burn_in_vals
=
[]
prod_vals
=
lnl
[:,
burnin_idx
:].
flatten
()
axes
[
-
1
].
hist
(
prod_vals
[
~
np
.
isnan
(
prod_vals
)],
bins
=
50
,
histtype
=
'step'
,
color
=
'k'
)
try
:
axes
[
-
1
].
hist
(
prod_vals
[
~
np
.
isnan
(
prod_vals
)],
bins
=
50
,
histtype
=
'step'
,
color
=
'k'
)
except
ValueError
:
logging
.
info
(
'Det. Stat. hist failed, most likely all '
'values where the same'
)
pass
if
self
.
BSGL
:
axes
[
-
1
].
set_xlabel
(
r
'$\mathcal{B}_\mathrm{S/GL}$'
)
else
:
...
...
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