Skip to content

Commit

Permalink
Merge pull request #30 from LucaMantani/fix_data_theory_comparison_bug
Browse files Browse the repository at this point in the history
fix bug affecting data theory comparison
  • Loading branch information
comane authored Nov 1, 2023
2 parents 946602c + ee74304 commit afd9c09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion validphys2/src/validphys/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,11 @@ def dataset_bsm_factor(dataset, pdf, read_bsm_facs):
res: np.arrays
An ``ndat`` x ``nrep`` array containing the fitted BSM-factors.
"""
parsed_bsm_facs = parse_simu_parameters_names_CF(dataset.simu_parameters_names_CF, dataset.cuts)
parsed_bsm_facs = parse_simu_parameters_names_CF(
dataset.simu_parameters_names_CF,
dataset.simu_parameters_linear_combinations,
dataset.cuts
)

if parsed_bsm_facs is None:
# We want an array of ones that ndata x nrep
Expand Down
2 changes: 1 addition & 1 deletion validphys2/src/validphys/simunet_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ def _compute_fisher_information_matrix(dataset_inputs, theoryid, groups_covmat,
if dataset_inputs is not None:
for dataset in dataset_inputs:
ds = l.check_dataset(name=dataset.name, theoryid=theoryid, cfac=dataset.cfac, simu_parameters_names=dataset.simu_parameters_names)
bsm_fac = parse_simu_parameters_names_CF(ds.simu_parameters_names_CF, cuts=ds.cuts)
bsm_fac = parse_simu_parameters_names_CF(ds.simu_parameters_names_CF, ds.simu_parameters_linear_combinations, cuts=ds.cuts)
central_sm = central_predictions(ds, pdf)
coefficients = central_sm.to_numpy().T * np.array([i.central_value for i in bsm_fac.values()])
bsm_factors += [coefficients]
Expand Down

0 comments on commit afd9c09

Please sign in to comment.