Make `genpdf` run on `LUXqed17_plus_PDF4LHC15_nnlo_100`
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 48/100
Direzione di ricerca
Start with src/ekobox/genpdf/load.py and trace how load_blocks_from_file parses the PDF data file, especially its header and PID row. Check whether comment lines and extra whitespace or chunks in the named set explain the failure; done means genpdf can parse LUXqed17_plus_PDF4LHC15_nnlo_100 while preserving the intended header handling.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 13
- Fork
- 9
- Merge medio
- 6g 16h
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NNPDF/eko
-
Update yaml reader in rustApertarust
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
-
physics
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
physics
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Improve Python workflowApertabenchmarks
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
Centralize Maturin workflowsApertabenchmarks rust
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Layout accepts a step threshold of 0 or less, then in-toto-verify crashes with StopIterationForse già presa @BahaaMattar l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
needs discussion
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
openfga/openfga.dev#1436 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
usb-device-hid: MouseInterface reports bInterfaceProtocol 1 (keyboard) instead of 2Forse già presa @Duhan07 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
micropython/micropython-lib#1176 ·