Skip to content
Snippets Groups Projects
Commit 65fb42d2 authored by Sylvia Biscoveanu's avatar Sylvia Biscoveanu
Browse files

Fix hyperpe example

parent 84f35d58
No related branches found
No related tags found
1 merge request!910Fix hyper PE example
......@@ -48,7 +48,7 @@ for i in range(Nevents):
likelihood=likelihood, priors=priors, sampler='nestle', nlive=1000,
outdir=outdir, verbose=False, label='individual_{}'.format(i),
save=False, injection_parameters=injection_parameters)
ax2.hist(result.posterior.c0, color=line[0].get_color(), normed=True,
ax2.hist(result.posterior.c0, color=line[0].get_color(), density=True,
alpha=0.5, label=labels[i])
results.append(result)
......@@ -62,12 +62,12 @@ ax2.legend()
fig2.savefig('outdir/hyper_parameter_combined_posteriors.png')
def hyper_prior(data, mu, sigma):
return np.exp(- (data['c0'] - mu)**2 / (2 * sigma**2)) /\
def hyper_prior(dataset, mu, sigma):
return np.exp(- (dataset['c0'] - mu)**2 / (2 * sigma**2)) /\
(2 * np.pi * sigma**2)**0.5
def run_prior(data):
def run_prior(dataset):
return 1 / 20
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment