Skip to content

Commit

Permalink
remove 'theory_covmat_flag'
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyStegeman committed Nov 15, 2024
1 parent f6cc25b commit 14ff70e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions validphys2/src/validphys/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,7 @@ def produce_experiment_from_input(self, experiment_input, theoryid, use_cuts, fi
}

@configparser.explicit_node
def produce_dataset_inputs_fitting_covmat(
self, theory_covmat_flag=False, use_thcovmat_in_fitting=False
):
def produce_dataset_inputs_fitting_covmat(self, use_thcovmat_in_fitting=False):
"""
Produces the correct covmat to be used in fitting_data_dict according
to some options: whether to include the theory covmat, whether to
Expand All @@ -750,7 +748,7 @@ def produce_dataset_inputs_fitting_covmat(
"""
from validphys import covmats

if theory_covmat_flag and use_thcovmat_in_fitting:
if use_thcovmat_in_fitting:
return covmats.dataset_inputs_t0_total_covmat
return covmats.dataset_inputs_t0_exp_covmat

Expand All @@ -761,7 +759,7 @@ def produce_sep_mult(self, separate_multiplicative=False):

@configparser.explicit_node
def produce_dataset_inputs_sampling_covmat(
self, sep_mult=False, theory_covmat_flag=False, use_thcovmat_in_sampling=False
self, sep_mult=False, use_thcovmat_in_sampling=False
):
"""
Produces the correct covmat to be used in make_replica according
Expand All @@ -770,7 +768,7 @@ def produce_dataset_inputs_sampling_covmat(
"""
from validphys import covmats

if theory_covmat_flag and use_thcovmat_in_sampling:
if use_thcovmat_in_sampling:
if sep_mult:
return covmats.dataset_inputs_total_covmat_separate
else:
Expand All @@ -785,15 +783,16 @@ def produce_loaded_theory_covmat(
self,
output_path,
data_input,
theory_covmat_flag=False,
use_user_uncertainties=False,
use_scalevar_uncertainties=True,
use_thcovmat_in_sampling=False,
use_thcovmat_in_fitting=False,
):
"""
Loads the theory covmat from the correct file according to how it
was generated by vp-setupfit.
"""
if theory_covmat_flag is False:
if not use_thcovmat_in_sampling and not use_thcovmat_in_fitting:
return 0.0
# Load correct file according to how the thcovmat was generated by vp-setupfit
generic_path = "datacuts_theory_theorycovmatconfig_theory_covmat_custom.csv"
Expand Down

0 comments on commit 14ff70e

Please sign in to comment.