Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
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
Commits
49e1ac46
Commit
49e1ac46
authored
5 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Plain Diff
Merge branch '398-emcee-chains-error' into 'master'
Resolve "Emcee chains error" Closes
#398
See merge request
!579
parents
7a54c735
9c15e3e9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!579
Resolve "Emcee chains error"
Pipeline
#75889
passed with warnings
5 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bilby/core/sampler/emcee.py
+10
-10
10 additions, 10 deletions
bilby/core/sampler/emcee.py
with
10 additions
and
10 deletions
bilby/core/sampler/emcee.py
+
10
−
10
View file @
49e1ac46
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment