-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add a new plot_fancy_dataspecs
and chi2 distributions with scale variations
#1830
Conversation
af345e8
to
ba21977
Compare
ec34958
to
1733a1e
Compare
3fea7dc
to
856675c
Compare
This is ready for review. Given #1844, trying to do the theory covmat in the same way as the pdferr risks creating a lot of secondary problems. And, unlike pdf erros, the scale variations are actively being used. Therefore I think for the time being I prefer to leave the I've also gone ahead and added an (edit: the many force-push are to make it closer to master so that I can more easily use this for the PDF4LHC plots together with the new commondata reader) |
3afed78
to
e5e0aee
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.
I still want to have a bit of a closer look later, but it all seems reasonable enough
…hi2 per-dataset with scale variations
Co-authored-by: Roy Stegeman <roystegeman@live.nl>
cd082f1
to
76f5462
Compare
Since the code has been tagged now, can we merge this? |
Yes fine for me |
With this one can get reports such as https://vp.nnpdf.science/8W7S2JStS3ySBXmea0PEJg==
This is not ready for review (but if anyone wants to have a look feel free).
A brief explanation of the changes:
In the theorycovariance module (/cc @andreab1997), I've broken down the function
covs_pt_prescrip
so that I can access the internal logic. I've done this in order to manually compute the theory covariance for single datasets without worrying about the processes. This might not be actually necessary but I wanted to ensure that I was not getting unwanted contributions.I've added a few plotting functions to
dataplots.py
.plot_chi2dist_sv
: this one might not be necessary, it should be possible with the proper change toconfig.py
to get a covariance matrix computed on the fly as part of the chi2. I know how to do it only for covmats that are loaded from a fit, but it should be possible. For this I needed to addresults_with_theory_covmat
toresults.py
which would also be unnecessary once I fix the previous point. But before playing with the code I wanted to have something functional since PDF4LHC is coming close.plot_fancy_sv_dataspecs
: theory-data comparison where the errors in the theory are actually the PDF uncertainties and the scale variations added in quadrature, where the scale variations are the diagonal of the theory covariance matrix. This required adding toresults.py
a new classThUncertaintiesResult
and aresults_with_scale_variations
. As far as I can see this part will be necessary because within validphys the theory covariance matrix is always added to the experimental covmat while in this case we want to use both contributions separately.(all other changes in
dataplots.py
are due toblack
)btw, there are a few functions scattered around the code that claim to do some of these things, however either they no longer work or they use functions that have not been touched in a long time (and that nobody doing MHOU is using anymore) so I've preferred to ignore them. They will be removed in due time.