Skip to content

Commit bbce1b2

Browse files
committed
removed comments, included check_fit..as_input() in vp_comparefits
1 parent cff9824 commit bbce1b2

File tree

2 files changed

+6
-36
lines changed

2 files changed

+6
-36
lines changed

validphys2/src/validphys/fitdata.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -282,35 +282,6 @@ def t0_chi2_info_table(pdf, dataset_inputs_abs_chi2_data, t0pdfset, use_t0):
282282
all_datasets = collect('dataset', ('data',))
283283
fits_datasets = collect('all_datasets', ('fits', 'fitinputcontext'))
284284

285-
#def match_excluded_datasets_by_name(match_datasets_by_name):
286-
# """Like produce_matched_datasets_from_dataspecs but for all datasets excluded from the fit."""
287-
# self._check_dataspecs_type(dataspecs)
288-
# loader = Loader()
289-
#
290-
# implemented = set(loader.implemented_datasets)
291-
# all_used = []
292-
#
293-
# for spec in dataspecs:
294-
# with self.set_context(ns=self._curr_ns.new_child(spec)):
295-
# _, data_input = self.parse_from_(None, "data_input", write=False)
296-
# names = {}
297-
# for dsin in data_input:
298-
# cd = self.produce_commondata(dataset_input=dsin)
299-
# proc = get_info(cd).nnpdf31_process
300-
# ds = dsin.name
301-
# names[(proc, ds)] = dsin
302-
# all_used.append(names)
303-
#
304-
# used_union = {ds for d in all_used for (_, ds) in d.keys()}
305-
# excluded_set = implemented - used_union
306-
307-
# datasetcomp = match_datasets_by_name()
308-
309-
310-
# return excluded_set
311-
312-
313-
314285

315286
@make_argcheck
316287
def _assert_two_fits(fits):

validphys2/src/validphys/scripts/vp_comparefits.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,14 @@ def get_config(self):
241241
return self.config_class(c, environment=self.environment)
242242

243243
def check_identical_theory_cuts_covmat(self):
244+
"""
245+
Checks whether the theory ID, data cuts, and thcovmat are the same between the two fits.
246+
In the affirmative case, a mismatched datasets page will be added to the report.
247+
"""
244248
args = self.args
245249
l = self.environment.loader
246-
current_runcard_path = l.check_fit(args['current_fit']).path / "filter.yml"
247-
reference_runcard_path = l.check_fit(args['reference_fit']).path / "filter.yml"
248-
249-
with open(current_runcard_path) as fc:
250-
with open(reference_runcard_path) as fr:
251-
current_runcard = yaml_safe.load(fc)
252-
reference_runcard = yaml_safe.load(fr)
250+
current_runcard = l.check_fit(args['current_fit']).as_input()
251+
reference_runcard = l.check_fit(args['reference_fit']).as_input()
253252

254253
current_thcovmat = current_runcard.get("theorycovmatconfig")
255254
reference_thcovmat = reference_runcard.get("theorycovmatconfig")

0 commit comments

Comments
 (0)