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
9e56db0b
Commit
9e56db0b
authored
Apr 11, 2017
by
Gregory Ashton
Browse files
Merge branch 'master' of gitlab.aei.uni-hannover.de:GregAshton/PyFstat
parents
f2cba8b5
6a3de783
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyfstat/mcmc_based_searches.py
View file @
9e56db0b
...
...
@@ -571,7 +571,7 @@ class MCMCSearch(core.BaseSearchClass):
fig
.
subplots_adjust
(
hspace
=
0.05
,
wspace
=
0.05
)
if
add_prior
:
self
.
add_prior_to_corner
(
axes
,
samples
_plt
)
self
.
add_prior_to_corner
(
axes
,
self
.
samples
)
fig_triangle
.
savefig
(
'{}/{}_corner.png'
.
format
(
self
.
outdir
,
self
.
label
),
dpi
=
dpi
)
...
...
@@ -587,8 +587,8 @@ class MCMCSearch(core.BaseSearchClass):
subtractor
=
self
.
get_rescale_subtractor_for_key
(
key
)
ax2
=
ax
.
twinx
()
ax2
.
get_yaxis
().
set_visible
(
False
)
ax2
.
plot
(
x
,
[(
prior
(
xi
)
-
subtractor
)
*
multiplier
for
xi
in
x
],
'-r'
)
ax
.
set_xlim
(
xlim
)
ax2
.
plot
(
(
x
-
subtractor
)
*
multiplier
,
[
prior
(
xi
)
for
xi
in
x
],
'-r'
)
ax
2
.
set_xlim
(
xlim
)
def
plot_prior_posterior
(
self
,
normal_stds
=
2
):
""" Plot the posterior in the context of the prior """
...
...
@@ -1286,7 +1286,13 @@ class MCMCGlitchSearch(MCMCSearch):
unit_dictionary
=
dict
(
F0
=
'Hz'
,
F1
=
'Hz/s'
,
F2
=
'Hz/s$^2$'
,
alpha
=
r
'rad'
,
delta
=
'rad'
,
delta_F0
=
'Hz'
,
delta_F1
=
'Hz/s'
,
tglitch
=
's'
)
rescale_dictionary
=
dict
()
rescale_dictionary
=
dict
(
tglitch
=
{
'multiplier'
:
1
/
86400.
,
'subtractor'
:
'minStartTime'
,
'unit'
:
'day'
,
'label'
:
'Glitch time
\n
days after minStartTime'
}
)
@
helper_functions
.
initializer
def
__init__
(
self
,
label
,
outdir
,
sftfilepath
,
theta_prior
,
tref
,
...
...
Write
Preview
Supports
Markdown
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