Skip to content

Commit 9bf44b2

Browse files
Make filters run and clean up
1 parent 017546e commit 9bf44b2

17 files changed

+131149
-147
lines changed
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
data_central:
2+
- 364.0
3+
- 209.0
4+
- 220.0
5+
- 243.0
6+
- 119.0
7+
- 176.0
8+
- 174.0
9+
- 140.0
10+
- 105.0
11+
- 123.0
12+
- 34.9
13+
- 28.9
14+
- 27.4
15+
- 16.2
16+
- 10.7
17+
- 3.57
18+
- 1.7
19+
- 399.0
20+
- 315.0
21+
- 277.0
22+
- 244.0
23+
- 237.0
24+
- 192.0
25+
- 166.0
26+
- 161.0
27+
- 145.0
28+
- 127.0
29+
- 45.6
30+
- 28.9
31+
- 30.9
32+
- 19.9
33+
- 12.5
34+
- 5.8
35+
- 1.79
36+
- 0.474
37+
- 424.0
38+
- 350.0
39+
- 363.0
40+
- 248.0
41+
- 208.0
42+
- 212.0
43+
- 148.0
44+
- 144.0
45+
- 143.0
46+
- 114.0
47+
- 39.7
48+
- 33.1
49+
- 27.4
50+
- 21.6
51+
- 15.1
52+
- 6.05
53+
- 1.86
54+
- 0.404
55+
- 431.0
56+
- 347.0
57+
- 386.0
58+
- 274.0
59+
- 294.0
60+
- 223.0
61+
- 169.0
62+
- 137.0
63+
- 137.0
64+
- 126.0
65+
- 46.0
66+
- 37.0
67+
- 30.2
68+
- 23.1
69+
- 14.7
70+
- 7.0
71+
- 2.24
72+
- 0.495
73+
- 560.0
74+
- 405.0
75+
- 315.0
76+
- 274.0
77+
- 318.0
78+
- 214.0
79+
- 162.0
80+
- 159.0
81+
- 135.0
82+
- 133.0
83+
- 57.1
84+
- 41.1
85+
- 34.5
86+
- 25.1
87+
- 16.4
88+
- 6.43
89+
- 2.2
90+
- 0.56
91+
- 419.0
92+
- 396.0
93+
- 331.0
94+
- 377.0
95+
- 401.0
96+
- 193.0
97+
- 153.0
98+
- 151.0
99+
- 134.0
100+
- 149.0
101+
- 59.5
102+
- 40.3
103+
- 31.3
104+
- 23.2
105+
- 15.9
106+
- 6.3
107+
- 2.38
108+
- 0.607
109+
- 198.0
110+
- 173.0
111+
- 149.0
112+
- 98.6
113+
- 71.1
114+
- 28.7
115+
- 36.8
116+
- 24.7
117+
- 14.6
118+
- 6.14
119+
- 1.95
120+
- 0.423

nnpdf_data/nnpdf_data/commondata/DYE605_Z0_38P8GEV_DW/filter.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
from dataclasses import dataclass
2-
from os import PathLike
32
from pathlib import Path
4-
import typing
5-
from typing import List
63

74
import numpy as np
85
import pandas as pd
96
import yaml
107

11-
from nnpdf_data.filter_utils.hera_utils import commondata, covmat_is_close
8+
from nnpdf_data.filter_utils.hera_utils import commondata
9+
from nnpdf_data.filter_utils.utils import prettify_float
10+
11+
yaml.add_representer(float, prettify_float)
1212

1313

1414
def mergetables() -> pd.DataFrame:
@@ -37,7 +37,7 @@ def mergetables() -> pd.DataFrame:
3737
return combined_df
3838

3939

40-
def nuclear_uncert_dw(tableN: PathLike, tablep: PathLike):
40+
def nuclear_uncert_dw(tableN: Path, tablep: Path):
4141
dfN = pd.read_table(tableN)
4242
dfp = pd.read_table(tablep)
4343
return dfN, dfp
@@ -70,8 +70,8 @@ def __init__(self, data: pd.DataFrame, dataset_name: str, process: str):
7070
nrep = 999
7171
norm = np.sqrt(nrep)
7272
dfN, dfp = nuclear_uncert_dw(
73-
"rawdata/nuclear/output/tables/group_result_table.csv",
74-
"rawdata/proton_ite/output/tables/group_result_table.csv",
73+
Path("rawdata/nuclear/output/tables/group_result_table.csv"),
74+
Path("rawdata/proton_ite/output/tables/group_result_table.csv"),
7575
)
7676

7777
for rep in range(1, nrep + 1):
@@ -94,10 +94,6 @@ def main():
9494
Path("kinematics_reimplemented_PXSEC.yaml"),
9595
Path("uncertainties_reimplemented_PXSEC.yaml"),
9696
)
97-
if covmat_is_close("DYE605_Z0_38P8GEV_DW_PXSEC", "legacy", "reimplemented"):
98-
print("covmat is close")
99-
else:
100-
print("covmat is different.")
10197

10298

10399
if __name__ == "__main__":

0 commit comments

Comments
 (0)