Skip to content
Snippets Groups Projects
Commit bf4f841b authored by andreab1997's avatar andreab1997
Browse files

Minor change

parent 7e89de08
No related branches found
No related tags found
2 merge requests!1557Fix the chi2 computation in the report when there is a thcovmat,!1528Fit with theory covmat with n3fit
......@@ -167,10 +167,11 @@ def make_replica(groups_dataset_inputs_loaded_cd_with_cuts, replica_mcseed, dat
# The inner while True loop is for ensuring a positive definite
# pseudodata replica
all_pseudodata = np.concatenate(pseudodatas, axis=0)
full_mask=np.concatenate(check_positive_masks, axis=0)
while True:
shifts = covmat_sqrt @ rng.normal(size=covmat.shape[1])
shifted_pseudodata = (all_pseudodata + shifts)
if np.all(shifted_pseudodata[np.concatenate(check_positive_masks, axis=0)] >= 0):
if np.all(shifted_pseudodata[full_mask] >= 0):
break
return shifted_pseudodata
......
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