Commit 064e938b authored by  Hector Salas's avatar Hector Salas
Browse files

Add wlikely to analysis function in to fix bug with nan values

parent 00d6eaad
......@@ -203,8 +203,9 @@ def analysis(idx, obs):
values = _([i, wz] * scaling * corr_dz)
values = _([i, wz])
mean, std = weighted_param(values, likelihood)
wlikely = np.isfinite(likelihood)
mean, std = weighted_param(values[wlikely], likelihood[wlikely])
gbl_results.bayes.means[idx, i] = mean
gbl_results.bayes.errors[idx, i] = std
if gbl_models.conf['analysis_params']['save_chi2'] is True:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment