Skip to content

Commit

Permalink
fix labels in metadata, remove legacy variants.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterkrack committed Dec 8, 2024
1 parent 720e8b2 commit ca03af7
Show file tree
Hide file tree
Showing 30 changed files with 244,345 additions and 234 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
data_central:
- 1.93442
- 1.18842
- 1.09083
- 0.945787
- 0.64265
- 1.09285
- 0.968211
- 0.699187
- 0.828353
- 0.888693
- 0.918176
- 0.742817
- 0.68052
- 0.518543
- 0.826533
- 0.751208
- 0.65218
- 0.517817
- 0.347519
- 0.805039
- 0.753829
- 0.612645
- 0.513845
- 0.700136
- 0.661413
- 0.610072
- 0.477637
- 0.265119
- 0.629463
- 0.581481
- 0.433334
- 0.283549
- 0.0784092
- 0.633285
- 0.419102
- 0.244088
- 0.0354223
- 0.45407
- 0.204185
- 0.0360293
- 0.231484
- 0.0400048
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
data_central:
- 1.18675
- 1.22518
- 0.859383
- 0.486058
- 0.568986
- 0.733295
- 0.938222
- 0.862571
- 0.581762
- 0.427877
- 0.652046
- 0.73028
- 0.514539
- 0.430511
- 0.232498
- 0.565801
- 0.47527
- 0.345586
- 0.227097
- 0.0720415
- 0.516801
- 0.42653
- 0.344256
- 0.216152
- 0.384166
- 0.37732
- 0.312035
- 0.166411
- 0.0630063
- 0.225031
- 0.219447
- 0.143425
- 0.0840442
- 0.116492
- 0.11034
- 0.0486679
- 0.0448906
- 0.0311428
- 0.00820963
26 changes: 6 additions & 20 deletions nnpdf_data/nnpdf_data/commondata/HERA_CC_318GEV/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import numpy as np
import pandas as pd
from os import PathLike
from fortranformat import FortranRecordWriter
import yaml

@dataclass
Expand Down Expand Up @@ -53,27 +52,14 @@ def __init__(self, filename: str | PathLike, dataset_name: str,
self.dataset_name = dataset_name

def main():
print("Reimplementing the HERA commondata")
hera_em = hera_commondata("./rawdata/HERA1+2_CCem.dat","HERACOMBCCEM", "DIS_CC")
hera_em.write_new_commondata(Path("data_reimplemented_EM-SIGMARED.yaml"),
Path("kinematics_reimplemented_EM-SIGMARED.yaml"),
Path("uncertainties_reimplemented_EM-SIGMARED.yaml"))
hera_em.write_new_commondata(Path("data_EM-SIGMARED.yaml"),
Path("kinematics_EM-SIGMARED.yaml"),
Path("uncertainties_EM-SIGMARED.yaml"))
hera_ep = hera_commondata("./rawdata/HERA1+2_CCep.dat","HERACOMBCCEP", "DIS_CC")
hera_ep.write_new_commondata(Path("data_reimplemented_EP-SIGMARED.yaml"),
Path("kinematics_reimplemented_EP-SIGMARED.yaml"),
Path("uncertainties_reimplemented_EP-SIGMARED.yaml"))
# Check if the covariance matrix of the reimplemented data is close to the
# legacy implementation
print("Check covariance matrix for HERA_CC_318GEV_EM-SIGMARED:")
if(covmat_is_close("HERA_CC_318GEV_EM-SIGMARED","reimplemented","legacy")):
print("Covmat is close.")
else:
print("Covmat is different.")
print("Check covariance matrix for HERA_CC_318GEV_EP-SIGMARED:")
if(covmat_is_close("HERA_CC_318GEV_EP-SIGMARED","reimplemented","legacy")):
print("Covmat is close.")
else:
print("Covmat is different.")
hera_ep.write_new_commondata(Path("data_EP-SIGMARED.yaml"),
Path("kinematics_EP-SIGMARED.yaml"),
Path("uncertainties_EP-SIGMARED.yaml"))

if __name__ == "__main__":
main()
Expand Down
60 changes: 25 additions & 35 deletions nnpdf_data/nnpdf_data/commondata/HERA_CC_318GEV/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
setname: HERA_CC_318GEV
version: 1
version_comment: Port of old commondata
version_comment: Reimplementation of HERA dataset in new commondata format
nnpdf_metadata:
nnpdf31_process: DIS CC
experiment: HERACOMB
Expand All @@ -23,7 +23,8 @@ implemented_observables:
npoints: []
ndata: 42
plotting:
kinematics_override: dis_sqrt_scale
#kinematics_override: dis_sqrt_scale
kinematics_override: identity
theory_reference: Bertone:2013vaa
dataset_label: HERA I+II inclusive CC $e^-p$
y_label: $10^{qbin} F_2(x,Q^2)$
Expand All @@ -45,32 +46,26 @@ implemented_observables:
kinematics:
variables:
x:
description: Variable x
label: x
description: Bjorken x
label: "$x$"
units: ''
Q2:
description: Variable Q2
label: Q2
units: ''
description: Square of momentum transfer
label: "$Q2$"
units: '$GeV$'
y:
description: Variable y
label: y
description: Inelasticity y
label: "$y$"
units: ''
file: kinematics_EM-SIGMARED.yaml
theory:
conversion_factor: 1.0
operation: 'null'
FK_tables:
- - HERA_CC_318GEV_EM_SIGMARED
data_uncertainties: []
variants:
legacy:
data_uncertainties:
- uncertainties_legacy_EM-SIGMARED.yaml
reimplemented:
data_uncertainties:
- uncertainties_reimplemented_EM-SIGMARED.yaml
data_central: data_legacy_EM-SIGMARED.yaml
data_uncertainties:
- uncertainties_EM-SIGMARED.yaml
data_central: data_EM-SIGMARED.yaml
ported_from: HERACOMBCCEM
- observable_name: EP-SIGMARED
observable:
Expand All @@ -82,7 +77,8 @@ implemented_observables:
npoints: []
ndata: 39
plotting:
kinematics_override: dis_sqrt_scale
#kinematics_override: dis_sqrt_scale
kinematics_override: identity
theory_reference: Bertone:2013vaa
dataset_label: HERA I+II inclusive CC $e^+p$
y_label: $10^{qbin} F_2(x,Q^2)$
Expand All @@ -104,30 +100,24 @@ implemented_observables:
kinematics:
variables:
x:
description: Variable x
label: x
description: Bjorken x
label: "$x$"
units: ''
Q2:
description: Variable Q2
label: Q2
units: ''
description: Square of momentum transfer
label: "$Q2$"
units: '$GeV^2$'
y:
description: Variable y
label: y
description: Inelasticity y
label: "$y$"
units: ''
file: kinematics_EP-SIGMARED.yaml
theory:
conversion_factor: 1.0
operation: 'null'
FK_tables:
- - HERA_CC_318GEV_EP_SIGMARED
data_uncertainties: []
variants:
legacy:
data_uncertainties:
- uncertainties_legacy_EP-SIGMARED.yaml
reimplemented:
data_uncertainties:
- uncertainties_reimplemented_EP-SIGMARED.yaml
data_central: data_legacy_EP-SIGMARED.yaml
data_uncertainties:
- uncertainties_EP-SIGMARED.yaml
data_central: data_EP-SIGMARED.yaml
ported_from: HERACOMBCCEP
Loading

0 comments on commit ca03af7

Please sign in to comment.