Positivity predictions mismatched and duplicated in the report
Created by: Zaharid
In short, we need a plot_positivity_dataspecs
and use it properly. While we are on it, we should also use the new info files from #589 in the plots.
To quote from https://github.com/NNPDF/nnpdf/pull/595#issuecomment-541858285:
Right. This is weird and confusing. It does the wrong thing but it is looks right in the report because the original thing did the wrong thing.
The idea is that you start with:
dataspecs: - speclabel: current posdatasets: - {dataset: A, ...} - {dataset: B, ...} other_stuff: ... - speclabel: reference posdatasets: - {dataset: A, ...} - {dataset: C, ...} other_stuff: ...
And want to end up with something like:
dataspecs: - posdataset_name: A dataspecs: - posdataset: {dataset: A, ...} speclabel: current other_stuff_from_the_first_spec - posdataset: {dataset: A, ...} speclabel: reference other_stuff_from_the_second_spec - posdataset_name: B dataspecs: - posdataset: {dataset: B, ...} speclabel: current other_stuff_from_the_first_spec. - posdataset: {dataset: B, ...} speclabel: reference other_stuff_from_the_second_spec.
which is all good and nice. And took me a while to figure out. The idea is that you "transpose" the original specification so as to group by the same positivity specs, so you can put together e.g. predictions with different theories. However in the report, we are not collecting over the inner dataspecs and then giving that to something like
plot_positivity_dataspecs
as we should, but instead iterating over the inner dataspecs and repeating the plots each time. You can indeed see that they are duplicated here:https://vp.nnpdf.science/rSw4iSvIQyWP0sABi7HOMQ==/#positivity
more concretely, it is computing the positivity with the common pdfs in plural, but potentially a different theory (i.e. the base and the reference one) upstairs and downstairs. So it is doing something like:
for each inner dataspec: positivity_plot( pdf from outer namespace, positivity + theory from inner dataspec )
Apparently nobody ever realized. Possibly has to do with the ridiculous impossible to read names. But that will get better thanks to #589 .
You are not really doing the union because of the happy-go-lucky try except that appeared which effectively removes the ones that don't appear somewhere. So in all instances we need something that groups positivity predictions with potentially different theories and puts them together in a plot.