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
Merge requests
!186
Resolve "add `filename=' option to `plot_corner'"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "add `filename=' option to `plot_corner'"
180-add-filename-to-corner
into
master
Overview
0
Commits
5
Pipelines
5
Changes
1
Merged
Gregory Ashton
requested to merge
180-add-filename-to-corner
into
master
6 years ago
Overview
0
Commits
5
Pipelines
5
Changes
1
Expand
Closes
#180 (closed)
0
0
Merge request reports
Compare
master
version 4
3c1fb7f2
6 years ago
version 3
46f61004
6 years ago
version 2
39e3ec60
6 years ago
version 1
b2bf90c6
6 years ago
master (base)
and
latest version
latest version
440cd653
5 commits,
6 years ago
version 4
3c1fb7f2
4 commits,
6 years ago
version 3
46f61004
3 commits,
6 years ago
version 2
39e3ec60
2 commits,
6 years ago
version 1
b2bf90c6
1 commit,
6 years ago
1 file
+
11
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
tupak/core/result.py
+
11
−
8
Options
@@ -270,8 +270,8 @@ class Result(dict):
string
=
r
"
${{{0}}}_{{-{1}}}^{{+{2}}}$
"
return
string
.
format
(
fmt
(
median
),
fmt
(
lower
),
fmt
(
upper
))
def
plot_corner
(
self
,
parameters
=
None
,
save
=
True
,
priors
=
None
,
dpi
=
300
,
titles
=
True
,
**
kwargs
):
def
plot_corner
(
self
,
parameters
=
None
,
priors
=
None
,
titles
=
True
,
save
=
True
,
filename
=
None
,
dpi
=
300
,
**
kwargs
):
"""
Plot a corner-plot using corner
See https://corner.readthedocs.io/en/latest/ for a detailed API.
@@ -280,18 +280,20 @@ class Result(dict):
----------
parameters: list, optional
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
titles: bool
If true, add 1D titles of the median and (by default 1-sigma)
error bars. To change the error bars, pass in the quantiles kwarg.
See method `get_one_dimensional_median_and_error_bar` for further
details). If `quantiles=None` is passed in, no title is added.
save: bool, optional
If true, save the image using the given label and outdir
filename: str, optional
If given, overwrite the default filename
dpi: int, optional
Dots per inch resolution of the plot
**kwargs:
Other keyword arguments are passed to `corner.corner`. We set some
defaults to improve the basic look and feel, but these can all be
@@ -368,8 +370,9 @@ class Result(dict):
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
)
if
filename
is
None
:
utils
.
check_directory_exists_and_if_not_mkdir
(
self
.
outdir
)
filename
=
'
{}/{}_corner.png
'
.
format
(
self
.
outdir
,
self
.
label
)
logger
.
debug
(
'
Saving corner plot to {}
'
.
format
(
filename
))
fig
.
savefig
(
filename
,
dpi
=
dpi
)
Loading