Add an example using PineAPPL to compute predictions#2049
Conversation
|
Hi @scarlehoff , I've found two problems with the nb:
def _get_pine_container(dataset):
cd = dataset.commondata
metadata = cd.metadata
theory_meta = metadata.theory
pinegrids = []
for operator in theory_meta.FK_tables:
tmp = []
for i in operator:
factor = theory_meta.conversion_factor
if theory_meta.normalization is not None: # <--------- Here
factor *= theory_meta.normalization.get(i, 1.0)I ''solved'' this problem by simply commenting out the two last lines.
full_chi2 = API.abs_chi2_data_thcovmat(**kwargs, **theory_opt, use_pdferr=True) and I get this error Note that the same does not happen with |
|
Hi @achiefa the first one is strange, because the normalization key should either be The second one instead really looks like pineappl is not able to find the grid? Maybe I hardcoded the folder somewhere without realising? (because I called the folder the same as the variable :__ ) |
|
I see this error for the normalisation |
|
edit: probably just a mismatch between the repo and the version of the code installed, should be fixable with |
04eaf5e to
59d1104
Compare
|
To use the |
bcb2657 to
6178d2f
Compare
6178d2f to
4ef332d
Compare
4ef332d to
593dfe9
Compare
9ca052c to
c7fa0bc
Compare
|
Since this has already been used by a few people and seems to work I'll merge it to master. |
Added a notebook to the examples folder where validphys is monkeypatched to utilize pineappl grids instead of fktables.
The code for this will not be integrated in validphys (validphys will keep using only fktables because changing to grids can open many cans of worms that I don't want to open) but as you can see in the notebook the code is quite simple.
This deals (in a way) with parts of #1961
ps: If there is any function in validphys for which the monkey patching in the notebook doesn't produce the desired result it might be due to said function using directly convolute instead of results. Please open an issue / PR because the more we make the validphys API be consistent the easiest it becomes to do things like this in a simple manner!