Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
65
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
15
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lscsoft
bilby
Merge requests
!579
Resolve "Emcee chains error"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Emcee chains error"
398-emcee-chains-error
into
master
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Gregory Ashton
requested to merge
398-emcee-chains-error
into
master
5 years ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
Closes
#398 (closed)
Edited
5 years ago
by
Gregory Ashton
👍
0
👎
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
9c15e3e9
1 commit,
5 years ago
1 file
+
10
−
10
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
bilby/core/sampler/emcee.py
+
10
−
10
Options
@@ -354,23 +354,23 @@ class Emcee(MCMCSampler):
self
.
checkpoint
()
self
.
result
.
sampler_output
=
np
.
nan
blobs_flat
=
np
.
array
(
self
.
sampler
.
blobs
).
reshape
((
-
1
,
2
))
log_likelihoods
,
log_priors
=
blobs_flat
.
T
chain
=
self
.
sampler
.
chain
.
reshape
((
-
1
,
self
.
ndim
))
log_ls
=
log_likelihoods
log_ps
=
log_priors
self
.
calculate_autocorrelation
(
chain
)
self
.
calculate_autocorrelation
(
self
.
sampler
.
chain
.
reshape
((
-
1
,
self
.
ndim
)))
self
.
print_nburn_logging_info
()
self
.
calc_likelihood_count
()
self
.
result
.
nburn
=
self
.
nburn
n_samples
=
self
.
nwalkers
*
self
.
nburn
if
self
.
result
.
nburn
>
self
.
nsteps
:
raise
SamplerError
(
"
The run has finished, but the chain is not burned in:
"
"
`nburn < nsteps`. Try increasing the number of steps.
"
)
self
.
result
.
samples
=
chain
[
n_samples
:,
:]
self
.
result
.
log_likelihood_evaluations
=
log_ls
[
n_samples
:]
self
.
result
.
log_prior_evaluations
=
log_ps
[
n_samples
:]
self
.
result
.
samples
=
self
.
sampler
.
chain
[:,
self
.
nburn
:,
:].
reshape
(
(
-
1
,
self
.
ndim
))
blobs
=
np
.
array
(
self
.
sampler
.
blobs
)
blobs_trimmed
=
blobs
[
self
.
nburn
:,
:,
:].
reshape
((
-
1
,
2
))
log_likelihoods
,
log_priors
=
blobs_trimmed
.
T
self
.
result
.
log_likelihood_evaluations
=
log_likelihoods
self
.
result
.
log_prior_evaluations
=
log_priors
self
.
result
.
walkers
=
self
.
sampler
.
chain
self
.
result
.
log_evidence
=
np
.
nan
self
.
result
.
log_evidence_err
=
np
.
nan
Loading