You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Talking with Stefan Kallweit I realized that genpdf can not parse LUXqed17_plus_PDF4LHC15_nnlo_100 because they added some more chunk to their .dat files. A minimal improvement would be
diff --git a/src/ekobox/genpdf/load.py b/src/ekobox/genpdf/load.py
index dbb23960..9b527f32 100644
--- a/src/ekobox/genpdf/load.py
+++ b/src/ekobox/genpdf/load.py
@@ -59,6 +59,19 @@ def load_blocks_from_file(pdfset_name, member):
cnt = []
with open(src / f"{pdfset_name}_{member:04d}.dat", encoding="utf-8") as o:
cnt = o.readlines()
+ ccnt = []
+ for l in cnt:
+ if l.strip().startswith("#"): continue
+ ccnt.append(l)
+ cnt = ccnt
+ def clear(s):
+ l = s.strip().split(" ")
+ ll = []
+ for e in l:
+ if len(e) == 0:
+ continue
+ ll.append(e)
+ return ll
# file head
head = cnt[0]
head_section = cnt.index("---\n")
@@ -69,7 +82,7 @@ def load_blocks_from_file(pdfset_name, member):
# determine participating pids
xgrid = np.array(cnt[head_section + 1].strip().split(" "), dtype=np.float_)
Qgrid = np.array(cnt[head_section + 2].strip().split(" "), dtype=np.float_)
- pids = np.array(cnt[head_section + 3].strip().split(" "), dtype=np.int_)
+ pids = np.array(clear(cnt[head_section + 3]), dtype=np.int_)
# data
data = []
for line in cnt[head_section + 4 : next_head_section]:
TODO:
convert this issue into a PR
maybe keep the comments in the head of the file
The text was updated successfully, but these errors were encountered:
Talking with Stefan Kallweit I realized that
genpdf
can not parseLUXqed17_plus_PDF4LHC15_nnlo_100
because they added some more chunk to their.dat
files. A minimal improvement would beTODO:
The text was updated successfully, but these errors were encountered: