Tests for evolven3fit_new and lhapdf .info files.#1746
Conversation
evolven3fit_newevolven3fit_new and lhapdf .info files.
|
@cschwan @RoyStegeman do you know if the order of the flavours in the |
|
I guess it would be better if the order were monotonic... |
The gluon being 21 is problematic :P But regardless, I don't know whether they are supposed to be in the same order so not sure whether the tests should fail right now or not. |
Well apparently you'd be okay with changing the order in one place so might as well move the gluon to the end of the list. To answer your question - no, I don't know if they need to be the same or where lhapdf uses each internally. |
Ah, sorry, I was thinking to a different type of flavor (the blocks for active number of flavors, but most likely they do not appear in the However, the flavors are embedded in each member file, so I guess that is the one used for In principle, the answer should then be no, they do not have to be the same. But in practice this depends on users code: if someone relies on them to be the same (despite not being guaranteed by LHAPDF), it would be surprising if they are not. |
|
https://gitlab.com/hepcedar/lhapdf/-/blob/main/src/Info.cc#L18-65 The only entries of (I would have expected more for UPDATE: there were more in the headers, but still not flavors |
|
But you are right:
Let's make sure they have the same order because who knows in which weird ways people is using LHAPDF. We don't want to produce broken sets. |
4a626be to
5e2dc6b
Compare
andreab1997
left a comment
There was a problem hiding this comment.
Everything seems good to me. Before approving this, let me add just a few commits
|
Can you add a test where you actually read the PDF using LHAPDF? something along the lines of import lhapdf # or vp equivalent
pdf = lhapdf.mkPDF("Blub",0)
for q2 in [10,100]: # make them in two different FNS
assert type(pdf.xfxQ2(pid, x, Q2)) == float # check LHAPDF can actually read for some chosen pid and x
assert type(pdf.alphasQ2(Q2)) == float # check LHAPDF can actually read |
Then you would have to install LHAPDF in the CI... Or run inside the |
That's already being done (through conda) |
|
RE the explicit LHAPDF test (cc @felixhekhorn) I'm not doing postfit or creating an actual PDF fit. I'm looking at the I'm not going to do it here since this PR is already growing a bit too much (and a bit out of scope due to the bugs found while doing it), but I'm planning to do a full fit (setupfit -> fit (2 replicas) -> eko -> postfit) to check that the entire fitting pipeline runs since at the moment each bit is tested by itself. |
I've added a tests that takes an existing fit (with theory 399) and performs the convolution with the eko internal to the theory.
After which the LHAPDF
.infofile is loaded and a few quick check are performed.Feel free to suggest further things to check (I've added the ones suggested in #1729 by @cschwan)
Note (@niclaurenti) that I've added the tests with
once theory 398 is ready, you can just create a small fit equivalent to
Basic_runcard_3replicas_lowprec_399and add it there and it should work ootb.