Skip to content

Commit

Permalink
fixed bug with probit samples
Browse files Browse the repository at this point in the history
  • Loading branch information
sterinaldi committed Dec 18, 2024
1 parent 18e617b commit 248c640
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions figaro/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ def get_priors(bounds, samples = None, mean = None, std = None, df = None, k = N
events_avg_cov = np.diag(np.atleast_2d(np.mean([np.cov(ev.T) for ev in samples], axis = 0)))
all_samples_cov = np.diag(np.atleast_2d(np.cov(all_samples.T)))
if probit:
out_sigma = (np.sqrt(np.diag(np.cov(np.array([np.median(ev, axis = 0) for ev in probit_samples]).T)))/scale).flatten()#(np.sqrt(all_samples_cov - events_avg_cov)/scale).flatten()
out_sigma = (np.sqrt(np.diag(np.cov(np.atleast_2d([np.median(ev, axis = 0) for ev in probit_samples]).T)))/scale).flatten()#(np.sqrt(all_samples_cov - events_avg_cov)/scale).flatten()
else:
out_sigma = (np.sqrt(np.diag(np.cov(np.array([np.median(ev, axis = 0) for ev in samples]).T)))/scale).flatten()#(np.sqrt(all_samples_cov - events_avg_cov)/scale).flatten()
out_sigma = (np.sqrt(np.diag(np.cov(np.atleast_2d([np.median(ev, axis = 0) for ev in samples]).T)))/scale).flatten()#(np.sqrt(all_samples_cov - events_avg_cov)/scale).flatten()
mu_out = np.mean(all_samples, axis = 0)
else:
out_sigma = np.diff(bounds, axis = -1)/scale
Expand Down

0 comments on commit 248c640

Please sign in to comment.