Add a new `plot_fancy_dataspecs` and chi2 distributions with scale variations
Created by: scarlehoff
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 to black
)
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.