-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sum covmats from various point prescriptions #2198
Conversation
5ab48cd
to
a16132c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @RoyStegeman, it looks much nicer now!
This prescription could also be removed as is the same as covmat_3pt
, no?
nnpdf/validphys2/src/validphys/theorycovariance/construction.py
Lines 97 to 105 in 15d26d4
def covmat_3rpt(name1, name2, deltas1, deltas2): | |
"""Returns theory covariance sub-matrix for 3pt renormalisation | |
scale variation *only*, given two dataset names and collections | |
of scale variation shifts""" | |
if name1 == name2: | |
s = 0.5 * (np.outer(deltas1[0], deltas2[0]) + np.outer(deltas1[1], deltas2[1])) | |
else: | |
s = 0.25 * (np.outer((deltas1[0] + deltas1[1]), (deltas2[0] + deltas2[1]))) | |
return s |
validphys2/src/validphys/scalevariations/pointprescriptions.yaml
Outdated
Show resolved
Hide resolved
ce9600d
to
62893d6
Compare
62893d6
to
9d4f2a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @RoyStegeman I think this is really good and very much needed.
Since it will be easy to make mistakes here... could you add some tests (using the scale variations theories already used in the tests). Perhaps you can just use a few different versions of 3pt
to make them run faster.
Checking things like ["3pt", "7pt"]
produces the same result as ["7pt", "3pt"]
for instance.
validphys2/src/validphys/scalevariations/pointprescriptions.yaml
Outdated
Show resolved
Hide resolved
b4506ec
to
c4dd733
Compare
…s in pointprescriptions
99a243c
to
f009a9b
Compare
conda build creates a new env ignoring the version of python in the original environment.
Other than the tests this looks good. I'm submitting the bot just in case there is an expected change in behaviour somewhere.
This is important, would it be possible to catch early the error in the old fit and print a message saying what to change? Since some students may want to reproduce eg |
Greetings from your nice fit 🤖 !
Check the report carefully, and please buy me a ☕ , or better, a GPU 😉! |
Yes I wasn't sure it would be necessary, but it's also quick to add so I'll do that |
validphys2/src/validphys/scalevariations/pointprescriptions.yaml
Outdated
Show resolved
Hide resolved
@scarlehoff I added some tests and the error if people use an old runcard, if you're happy I think this can be merged |
Co-authored-by: Juan M. Cruz-Martinez <[email protected]>
We now have various sources of uncertainty as the default option (IHOU DIS, IHOU DGLAP, MHOU 7pt) and various other sources of uncertainty that we regularly use. This number will only grow as we use the theory covariance method for the determination/implementation of higher twist, alphas, mtop, etc.
To avoid an exponentially growing
pointprescriptions.yaml
as a result of having to implement a new point prescription for each combination of uncertainties that we sum, this PR enables to put a list ofpoint_prescriptions
in the n3fit runcard instead of a singlepoint_prescription
. These point prescriptions each have their own associated covmat where then the sum of them is stored.We also store the individual covmats because the theory covariance method involves recomputing the theory covmat of the relevant parameter, so it's a good consistency check to see if the same is reproduced e.g. in case a different commit is used between fit and post-fit analysis using the theory covariance method.
As a proof of concept here is a N3LO QED+MHOU fit report comparing the current master branch to this branch: https://vp.nnpdf.science/B8uVm8CQQPK1LDNJoKdvJg==/
To see that the covmats are the same for both fits, you can use the following script
Code snippet
It does break backward compatibility and old runcards can not be used to run n3fit, though old fits can still be analyzed in the same way since the name of the theory covmat has not changed.
In particular the following changes impact how to write an n3fit runcard:
point_prescription
key is no longer supported and onlypoint_prescriptions
is, which takes a list of point prescriptions. Of course, that list can contain only a single point prescription.scalevariationtheoryids.yaml
so there is no need to explicitly declare it each time, i.e. no morepointprescriptions.yaml
.