Skip to content

Commit

Permalink
minimal modifications so that test and examples run without old comm…
Browse files Browse the repository at this point in the history
…ondata, remove the option to force reading an old commondata
  • Loading branch information
scarlehoff committed Sep 17, 2024
1 parent b16abc5 commit 2bbff1a
Show file tree
Hide file tree
Showing 16 changed files with 164 additions and 287 deletions.
4 changes: 2 additions & 2 deletions doc/sphinx/source/data/data-config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Experimental data storage
The central repository for ``CommonData`` in use by ``nnpdf`` projects is
located in the ``nnpdf`` git repository at

``nnpdf_data/nnpdf_data/new_commondata``
``nnpdf_data/nnpdf_data/commondata``

where a separate ``CommonData`` file is stored for each *Dataset* with the
filename format described in :ref:`dataset-naming-convention`.
Expand All @@ -45,7 +45,7 @@ The following lines will check whether a newly added theory can be read by valid
(change 700 by the id of your newly added theory).

.. code-block:: python
from nnpdf_data import theory_cards
from nnpdf_data.theorydbutils import fetch_theory
theory = fetch_theory(theory_cards, 700)
Expand Down
24 changes: 10 additions & 14 deletions nnpdf_data/nnpdf_data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
from ._version import __version__

path_vpdata = pathlib.Path(__file__).parent
path_commondata = path_vpdata / "new_commondata"
path_commondata = path_vpdata / "commondata"

# VP should not have access to this file, only to the products
_path_legacy_mapping = path_commondata / "dataset_names.yml"
legacy_to_new_mapping = yaml.YAML().load(_path_legacy_mapping)
theory_cards = path_vpdata / "theory_cards"

_legacy_to_new_mapping_raw = yaml.YAML().load(_path_legacy_mapping)
# Convert strings into a dictionary
legacy_to_new_mapping = {
k: ({"dataset": v} if isinstance(v, str) else v) for k, v in _legacy_to_new_mapping_raw.items()
}


@lru_cache
def legacy_to_new_map(dataset_name, sys=None):
Expand All @@ -22,13 +27,6 @@ def legacy_to_new_map(dataset_name, sys=None):
return dataset_name, None

new_name = legacy_to_new_mapping[dataset_name]
if isinstance(new_name, str):
if sys is not None:
raise KeyError(
f"I cannot translate the combination of {dataset_name} and sys: {sys}. Please report this."
)
return new_name, None

variant = new_name.get("variant")
new_name = new_name["dataset"]
if sys is not None:
Expand All @@ -48,11 +46,9 @@ def new_to_legacy_map(dataset_name, variant_used):
# we can have 2 old dataset mapped to the same new one

possible_match = None
for old_name, new_name in legacy_to_new_mapping.items():
variant = None
if not isinstance(new_name, str):
variant = new_name.get("variant")
new_name = new_name["dataset"]
for old_name, new_info in legacy_to_new_mapping.items():
new_name = new_info["dataset"]
variant = new_info.get("variant")

if new_name == dataset_name:
if variant_used == variant:
Expand Down
4 changes: 2 additions & 2 deletions nnpdf_data/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ repository = "https://github.com/NNPDF/nnpdf_data"

# Exclude intermediate data files
exclude = [
"nnpdf_data/new_commondata/*/rawdata",
"nnpdf_data/new_commondata/*/*.py",
"nnpdf_data/commondata/*/rawdata",
"nnpdf_data/commondata/*/*.py",
]
# Data files
include = [
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,6 @@ profile = "black" # https://black.readthedocs.io/en/stable/guides/using_black_wi
skip_gitignore = true
known_first_party = ["validphys", "eko", "n3fit", "nnpdf_data", "reportengine"]
force_sort_within_sections = true

[tool.pytest.ini_options]
addopts = "--disable-warnings"
6 changes: 3 additions & 3 deletions validphys2/examples/data_theory_comparison.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ meta:
author: Lazy Person

pdfs:
- id: NNPDF40_nnlo_lowprecision
label: NNPDF40_nnlo_lowprecision
- id: NNPDF40_nnlo_low_precision
label: NNPDF40_nnlo_low_precision

theoryid: 162
theoryid: 399

use_cuts: "internal"

Expand Down
6 changes: 3 additions & 3 deletions validphys2/examples/dataspecs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ dataspecs:
speclabel: "NLO"
fit: NNPDF40_nlo_as_01180

- theoryid: 162
pdf: NNPDF40_nnlo_lowprecision
- theoryid: 399
pdf: NNPDF40_nnlo_low_precision_240916
speclabel: "NNLO"
fit: NNPDF40_nnlo_lowprecision
fit: NNPDF40_nnlo_low_precision_240916


template_text: |
Expand Down
149 changes: 76 additions & 73 deletions validphys2/examples/future_test_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ my_description:
from_: meta

future:
pdf: {id: 210219-01-rs-nnpdf40-baseline, label: "NNPDF4.0"}
fit: {id: 210219-01-rs-nnpdf40-baseline, label: "NNPDF4.0"}
pdf: {id: 240516-jcm-nnpdf40-like, label: "NNPDF4.0"}
fit: {id: 240516-jcm-nnpdf40-like, label: "NNPDF4.0"}

speclabel: "NNPDF4.0 fit"
description:
Expand Down Expand Up @@ -41,77 +41,80 @@ past:
from_: fit

dataset_inputs:
- {dataset: NMCPD_dw, custom_group: "datasets pre HERA"}
- {dataset: NMC, custom_group: "datasets pre HERA"}
- {dataset: SLACP_dwsh, custom_group: "datasets pre HERA"}
- {dataset: SLACD_dw, custom_group: "datasets pre HERA"}
- {dataset: BCDMSP_dwsh, custom_group: "datasets pre HERA"}
- {dataset: BCDMSD_dw, custom_group: "datasets pre HERA"}
- {dataset: CHORUSNUPb_dw, custom_group: "datasets pre HERA"}
- {dataset: CHORUSNBPb_dw, custom_group: "datasets pre HERA"}
- {dataset: NTVNUDMNFe_dw, custom_group: "datasets pre HERA", cfac: [MAS]}
- {dataset: NTVNBDMNFe_dw, custom_group: "datasets pre HERA", cfac: [MAS]}
- {dataset: HERACOMBNCEM, custom_group: "datasets pre LHC"}
- {dataset: HERACOMBNCEP460, custom_group: "datasets pre LHC"}
- {dataset: HERACOMBNCEP575, custom_group: "datasets pre LHC"}
- {dataset: HERACOMBNCEP820, custom_group: "datasets pre LHC"}
- {dataset: HERACOMBNCEP920, custom_group: "datasets pre LHC"}
- {dataset: HERACOMBCCEM, custom_group: "datasets pre LHC"}
- {dataset: HERACOMBCCEP, custom_group: "datasets pre LHC"}
- {dataset: HERACOMB_SIGMARED_C, custom_group: "datasets pre LHC"}
- {dataset: HERACOMB_SIGMARED_B, custom_group: "datasets pre LHC"}
- {dataset: DYE886R_dw, custom_group: "datasets pre HERA"}
- {dataset: DYE886P, custom_group: "datasets pre HERA", cfac: [QCD]}
- {dataset: DYE605_dw, custom_group: "datasets pre HERA", cfac: [QCD]}
- {dataset: CDFZRAP_NEW, custom_group: "datasets pre LHC", cfac: [QCD]}
- {dataset: D0ZRAP, custom_group: "datasets pre LHC", cfac: [QCD]}
- {dataset: D0WMASY, custom_group: "datasets pre LHC", cfac: [QCD]}
- {dataset: ATLASWZRAP36PB, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLASZHIGHMASS49FB, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLASLOMASSDY11EXT, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLASWZRAP11CC, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLASWZRAP11CF, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLASDY2D8TEV, custom_group: "NNPDF40 datasets", cfac: [QCDEWK]}
- {dataset: ATLAS_WZ_TOT_13TEV, custom_group: "NNPDF40 datasets", cfac: [NRM, QCD]}
- {dataset: ATLAS_WP_JET_8TEV_PT, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLAS_WM_JET_8TEV_PT, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLASZPT8TEVMDIST, custom_group: "NNPDF40 datasets", cfac: [QCD], sys: 10}
- {dataset: ATLASZPT8TEVYDIST, custom_group: "NNPDF40 datasets", cfac: [QCD], sys: 10}
- {dataset: ATLASTTBARTOT, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLAS_TTB_DIFF_8TEV_LJ_TRAPNORM, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLAS_TTB_DIFF_8TEV_LJ_TTRAPNORM, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLAS_TOPDIFF_DILEPT_8TEV_TTRAPNORM, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLAS_1JET_8TEV_R06_DEC, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLAS_2JET_7TEV_R06, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLASPHT15, custom_group: "NNPDF40 datasets", cfac: [QCD, EWK]}
- {dataset: ATLAS_SINGLETOP_TCH_R_7TEV, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLAS_SINGLETOP_TCH_R_13TEV, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLAS_SINGLETOP_TCH_DIFF_7TEV_T_RAP_NORM, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLAS_SINGLETOP_TCH_DIFF_7TEV_TBAR_RAP_NORM, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLAS_SINGLETOP_TCH_DIFF_8TEV_T_RAP_NORM, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: ATLAS_SINGLETOP_TCH_DIFF_8TEV_TBAR_RAP_NORM, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMSWEASY840PB, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMSWMASY47FB, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMSDY2D11, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMSWMU8TEV, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMSZDIFF12, custom_group: "NNPDF40 datasets", cfac: [QCD, NRM], sys: 10}
- {dataset: CMS_2JET_7TEV, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMS_2JET_3D_8TEV, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMSTTBARTOT, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMSTOPDIFF8TEVTTRAPNORM, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMSTTBARTOT5TEV, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMS_TTBAR_2D_DIFF_MTT_TRAP_NORM, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMS_TTB_DIFF_13TEV_2016_2L_TRAP, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMS_TTB_DIFF_13TEV_2016_LJ_TRAP, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMS_SINGLETOP_TCH_TOT_7TEV, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMS_SINGLETOP_TCH_R_8TEV, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: CMS_SINGLETOP_TCH_R_13TEV, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: LHCBZ940PB, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: LHCBZEE2FB, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: LHCBWZMU7TEV, custom_group: "NNPDF40 datasets", cfac: [NRM, QCD]}
- {dataset: LHCBWZMU8TEV, custom_group: "NNPDF40 datasets", cfac: [NRM, QCD]}
- {dataset: LHCB_Z_13TEV_DIMUON, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: LHCB_Z_13TEV_DIELECTRON, custom_group: "NNPDF40 datasets", cfac: [QCD]}
- {dataset: NMC_NC_NOTFIXED_DW_EM-F2, custom_group: datasets pre HERA, variant: legacy}
- {dataset: NMC_NC_NOTFIXED_P_EM-SIGMARED, custom_group: datasets pre HERA, variant: legacy}
- {dataset: SLAC_NC_NOTFIXED_P_DW_EM-F2, custom_group: datasets pre HERA, variant: legacy}
- {dataset: SLAC_NC_NOTFIXED_D_DW_EM-F2, custom_group: datasets pre HERA, variant: legacy}
- {dataset: BCDMS_NC_NOTFIXED_P_DW_EM-F2, custom_group: datasets pre HERA, variant: legacy}
- {dataset: BCDMS_NC_NOTFIXED_D_DW_EM-F2, custom_group: datasets pre HERA, variant: legacy}
- {dataset: CHORUS_CC_NOTFIXED_PB_DW_NU-SIGMARED, custom_group: datasets pre HERA, variant: legacy}
- {dataset: CHORUS_CC_NOTFIXED_PB_DW_NB-SIGMARED, custom_group: datasets pre HERA, variant: legacy}
- {dataset: NUTEV_CC_NOTFIXED_FE_DW_NU-SIGMARED, custom_group: datasets pre HERA, cfac: [MAS], variant: legacy}
- {dataset: NUTEV_CC_NOTFIXED_FE_DW_NB-SIGMARED, custom_group: datasets pre HERA, cfac: [MAS], variant: legacy}
- {dataset: HERA_NC_318GEV_EM-SIGMARED, custom_group: datasets pre LHC, variant: legacy}
- {dataset: HERA_NC_225GEV_EP-SIGMARED, custom_group: datasets pre LHC, variant: legacy}
- {dataset: HERA_NC_251GEV_EP-SIGMARED, custom_group: datasets pre LHC, variant: legacy}
- {dataset: HERA_NC_300GEV_EP-SIGMARED, custom_group: datasets pre LHC, variant: legacy}
- {dataset: HERA_NC_318GEV_EP-SIGMARED, custom_group: datasets pre LHC, variant: legacy}
- {dataset: HERA_CC_318GEV_EM-SIGMARED, custom_group: datasets pre LHC, variant: legacy}
- {dataset: HERA_CC_318GEV_EP-SIGMARED, custom_group: datasets pre LHC, variant: legacy}
- {dataset: HERA_NC_318GEV_EAVG_CHARM-SIGMARED, custom_group: datasets pre LHC, variant: legacy}
- {dataset: HERA_NC_318GEV_EAVG_BOTTOM-SIGMARED, custom_group: datasets pre LHC, variant: legacy}
- {dataset: DYE866_Z0_800GEV_DW_RATIO_PDXSECRATIO, custom_group: datasets pre HERA, variant: legacy}
- {dataset: DYE866_Z0_800GEV_PXSEC, custom_group: datasets pre HERA, cfac: [QCD], variant: legacy}
- {dataset: DYE605_Z0_38P8GEV_DW_PXSEC, custom_group: datasets pre HERA, cfac: [QCD], variant: legacy}
- {dataset: CDF_Z0_1P96TEV_ZRAP, custom_group: datasets pre LHC, cfac: [QCD], variant: legacy}
- {dataset: D0_Z0_1P96TEV_ZRAP, custom_group: datasets pre LHC, cfac: [QCD], variant: legacy}
- {dataset: D0_WPWM_1P96TEV_ASY, custom_group: datasets pre LHC, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_DY_7TEV_36PB_ETA, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_Z0_7TEV_49FB_HIMASS, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_Z0_7TEV_LOMASS_M, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_DY_7TEV_46FB_CC, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_Z0_7TEV_46FB_CF-Y, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_Z0_8TEV_HIMASS_M-Y, custom_group: NNPDF40 datasets, cfac: [QCDEWK], variant: legacy}
- {dataset: ATLAS_DY_13TEV_TOT, custom_group: NNPDF40 datasets, cfac: [NRM, QCD], variant: legacy}
- {dataset: ATLAS_WJ_8TEV_WP-PT, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_WJ_8TEV_WM-PT, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_Z0J_8TEV_PT-M, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy_10}
- {dataset: ATLAS_Z0J_8TEV_PT-Y, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy_10}
- {dataset: ATLAS_TTBAR_7TEV_TOT_X-SEC, custom_group: "NNPDF40 datasets", cfac: [QCD], variant: legacy}
- {dataset: ATLAS_TTBAR_8TEV_TOT_X-SEC, custom_group: "NNPDF40 datasets", cfac: [QCD], variant: legacy}
- {dataset: ATLAS_TTBAR_13TEV_TOT_X-SEC, custom_group: "NNPDF40 datasets", cfac: [QCD], variant: legacy}
- {dataset: ATLAS_TTBAR_8TEV_LJ_DIF_YT-NORM, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_TTBAR_8TEV_LJ_DIF_YTTBAR-NORM, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_TTBAR_8TEV_2L_DIF_YTTBAR-NORM, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_1JET_8TEV_R06_PTY, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy_decorrelated}
- {dataset: ATLAS_2JET_7TEV_R06_M12Y, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_PH_13TEV_XSEC, custom_group: "NNPDF40 datasets", cfac: [QCD, EWK], variant: legacy}
- {dataset: ATLAS_SINGLETOP_7TEV_TCHANNEL-XSEC, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_SINGLETOP_13TEV_TCHANNEL-XSEC, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_SINGLETOP_7TEV_T-Y-NORM, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_SINGLETOP_7TEV_TBAR-Y-NORM, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_SINGLETOP_8TEV_T-RAP-NORM, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: ATLAS_SINGLETOP_8TEV_TBAR-RAP-NORM, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: CMS_WPWM_7TEV_ELECTRON_ASY, custom_group: NNPDF40 datasets, cfac: [QCD]}
- {dataset: CMS_WPWM_7TEV_MUON_ASY, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: CMS_Z0_7TEV_DIMUON_2D, custom_group: NNPDF40 datasets, cfac: [QCD]}
- {dataset: CMS_WPWM_8TEV_MUON_Y, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: CMS_Z0J_8TEV_PT-Y, custom_group: NNPDF40 datasets, cfac: [QCD, NRM], variant: legacy_10}
- {dataset: CMS_2JET_7TEV_M12Y, custom_group: NNPDF40 datasets, cfac: [QCD]}
- {dataset: CMS_TTBAR_7TEV_TOT_X-SEC, custom_group: "NNPDF40 datasets", cfac: [QCD], variant: legacy}
- {dataset: CMS_TTBAR_8TEV_TOT_X-SEC, custom_group: "NNPDF40 datasets", cfac: [QCD], variant: legacy}
- {dataset: CMS_TTBAR_13TEV_TOT_X-SEC, custom_group: "NNPDF40 datasets", cfac: [QCD], variant: legacy}
- {dataset: CMS_TTBAR_8TEV_LJ_DIF_YTTBAR-NORM, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: CMS_TTBAR_5TEV_TOT_X-SEC, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: CMS_TTBAR_8TEV_2L_DIF_MTTBAR-YT-NORM, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: CMS_TTBAR_13TEV_2L_DIF_YT, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: CMS_TTBAR_13TEV_LJ_2016_DIF_YTTBAR, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: CMS_SINGLETOP_7TEV_TCHANNEL-XSEC, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: CMS_SINGLETOP_8TEV_TCHANNEL-XSEC, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: CMS_SINGLETOP_13TEV_TCHANNEL-XSEC, custom_group: NNPDF40 datasets, cfac: [QCD], variant: legacy}
- {dataset: LHCB_Z0_7TEV_DIELECTRON_Y, custom_group: NNPDF40 datasets, cfac: [QCD]}
- {dataset: LHCB_Z0_8TEV_DIELECTRON_Y, custom_group: NNPDF40 datasets, cfac: [QCD]}
- {dataset: LHCB_DY_7TEV_MUON_Y, custom_group: NNPDF40 datasets, cfac: [NRM, QCD]}
- {dataset: LHCB_DY_8TEV_MUON_Y, custom_group: NNPDF40 datasets, cfac: [NRM, QCD]}
- {dataset: LHCB_Z0_13TEV_DIMUON-Y, custom_group: NNPDF40 datasets, cfac: [QCD]}
- {dataset: LHCB_Z0_13TEV_DIELECTRON-Y, custom_group: NNPDF40 datasets, cfac: [QCD]}

groups:
- metadata_group: custom_group
Expand Down
8 changes: 4 additions & 4 deletions validphys2/examples/generate_a_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ meta:
author: Lazy Person
keywords: [chi2, replica, distribution, DISonly]

fit: NNPDF31_nnlo_as_0118_DISonly
fit: NNPDF40_nnlo_low_precision_240916

pdf:
from_: "fit"

experiments:
dataset_inputs:
from_: "fit"

theoryid: 162
theoryid: 399

use_cuts: "fromfit"

template_text: |
# Histograms of χ2
## DIS only distributions
{@experiments::experiment plot_chi2dist@}
{@ plot_chi2dist_experiments @}
actions_:
- report(main=True)
2 changes: 1 addition & 1 deletion validphys2/examples/spiderplot_dataspecs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ meta:
author: Lazy Person
keywords: [example, spider]

fit: NNPDF40_nnlo_lowprecision
fit: NNPDF40_nnlo_low_precision_240916

theory:
from_: fit
Expand Down
2 changes: 1 addition & 1 deletion validphys2/src/validphys/commondataparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,6 @@ def load_commondata_new(metadata):
nsys=nsys,
commondata_table=commondata_table,
systype_table=systype_table,
legacy=False,
legacy_name=legacy_name,
kin_variables=metadata.kinematic_coverage,
)
Expand All @@ -949,6 +948,7 @@ def load_commondata(spec):


### Old commondata:
### All code below this line is deprecated and will be removed
def load_commondata_old(commondatafile, systypefile, setname):
"""Parse a commondata file and a systype file into a CommonData.
Expand Down
2 changes: 1 addition & 1 deletion validphys2/src/validphys/coredata.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class CommonData:
nsys: int
commondata_table: pd.DataFrame = dataclasses.field(repr=False)
systype_table: pd.DataFrame = dataclasses.field(repr=False)
legacy: bool
legacy: bool = False
systematics_table: Optional[pd.DataFrame] = dataclasses.field(init=None, repr=False)
legacy_name: Optional[str] = None
kin_variables: Optional[list] = None
Expand Down
Loading

0 comments on commit 2bbff1a

Please sign in to comment.