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

Add wlikely to analysis function in workers.py to fix bug with nan values

parent 00d6eaad
......@@ -203,8 +203,9 @@ def analysis(idx, obs):
values = _(gbl_models.properties[i, wz] * scaling * corr_dz)
else:
values = _(gbl_models.properties[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:
......
Markdown is supported
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