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
45bcef1b
Commit
45bcef1b
authored
6 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Add functionality to plot the priors on the 1D marginals
parent
92d57abd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#30300
passed
6 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tupak/core/result.py
+10
-0
10 additions, 0 deletions
tupak/core/result.py
with
10 additions
and
0 deletions
tupak/core/result.py
+
10
−
0
View file @
45bcef1b
...
...
@@ -248,6 +248,9 @@ class Result(dict):
If given, a list of the parameter names to include
save: bool, optional
If true, save the image using the given label and outdir
priors: tupak.core.prior.PriorSet
If given, add the prior probability density functions to the
one-dimensional marginal distributions
dpi: int, optional
Dots per inch resolution of the plot
**kwargs:
...
...
@@ -307,6 +310,13 @@ class Result(dict):
fig
=
corner
.
corner
(
xs
,
**
kwargs
)
axes
=
fig
.
get_axes
()
if
priors
is
not
None
:
for
i
,
par
in
enumerate
(
parameters
):
ax
=
axes
[
i
+
i
*
len
(
parameters
)]
theta
=
np
.
linspace
(
ax
.
get_xlim
()[
0
],
ax
.
get_xlim
()[
1
],
300
)
ax
.
plot
(
theta
,
priors
[
par
].
prob
(
theta
),
color
=
'
C2
'
)
if
save
:
utils
.
check_directory_exists_and_if_not_mkdir
(
self
.
outdir
)
filename
=
'
{}/{}_corner.png
'
.
format
(
self
.
outdir
,
self
.
label
)
...
...
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