Commit 807cd32b by Médéric Boquien

### Make sure that the valid models are selected for the scaling array too so it...

`Make sure that the valid models are selected for the scaling array too so it is the same size as the likelihood array.`
parent 5917743b
 ... @@ -186,6 +186,9 @@ def analysis(idx, obs): ... @@ -186,6 +186,9 @@ def analysis(idx, obs): # If all the models are valid, it is much more efficient to use a slice # If all the models are valid, it is much more efficient to use a slice if likelihood.size == wlikely[0].size: if likelihood.size == wlikely[0].size: wlikely = slice(None, None) wlikely = slice(None, None) likelihood = likelihood[wlikely] scaling_l = scaling[wlikely] gbl_results.bayes.weight[idx] = np.nansum(likelihood) gbl_results.bayes.weight[idx] = np.nansum(likelihood) # We compute the weighted average and standard deviation using the # We compute the weighted average and standard deviation using the ... @@ -197,7 +200,7 @@ def analysis(idx, obs): ... @@ -197,7 +200,7 @@ def analysis(idx, obs): else: else: _ = lambda x: x _ = lambda x: x values = _(gbl_models.intprop[prop][wz]) values = _(gbl_models.intprop[prop][wz]) mean, std = weighted_param(values[wlikely], likelihood[wlikely]) mean, std = weighted_param(values[wlikely], likelihood) gbl_results.bayes.intmean[prop][idx] = mean gbl_results.bayes.intmean[prop][idx] = mean gbl_results.bayes.interror[prop][idx] = std gbl_results.bayes.interror[prop][idx] = std if gbl_models.conf['analysis_params']['save_chi2'] is True: if gbl_models.conf['analysis_params']['save_chi2'] is True: ... @@ -210,8 +213,8 @@ def analysis(idx, obs): ... @@ -210,8 +213,8 @@ def analysis(idx, obs): else: else: _ = lambda x: x _ = lambda x: x values = _(gbl_models.extprop[prop][wz]) values = _(gbl_models.extprop[prop][wz]) mean, std = weighted_param(values[wlikely] * scaling * corr_dz, mean, std = weighted_param(values[wlikely] * scaling_l * corr_dz, likelihood[wlikely]) likelihood) gbl_results.bayes.extmean[prop][idx] = mean gbl_results.bayes.extmean[prop][idx] = mean gbl_results.bayes.exterror[prop][idx] = std gbl_results.bayes.exterror[prop][idx] = std if gbl_models.conf['analysis_params']['save_chi2'] is True: 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!