[do not merge] New Positivity tests
Created by: scarlehoff
The operation that needs to transform the pdf in the positivity scheme to the MS bar scheme should happen inside the NewPositivity.py layer that this branch adds. Basically at that point you get two PDFs, one of them would be the PDF you want to transform and the other is the PDF that would be inside the convoluton. For now I'm using the fktable-grid as the grid for the convolution, probably this is highly inefficient but for now it can work.
The result should be the PDF in the MSBar scheme so that in the line
# Very non-trivial operation that changes completely the PDF happens here
you want to add the transformation that you need to do.
Just to give an example, imagine the change of scheme is just changing the position of the gluon and the sigma (indices 1 and 2 if I am not mistaken) and summing to the original PDF, for that you would have to do something like this outside of the class (so it is not generated for every instance, you only need one for this case).
import numpy as np
import keras.backend as K
iden = np.eye(14)
iden[1,1] = 0
iden[2,2] = 0
iden[1,2] = 1
iden[2,1] = 1
tensor_rotate = K.constant(iden)
And inside the __call__
method:
return_pdf = pdf_in_x + self.tensor_product(pdf_in_z, tensor_rotate, axes=1)
Let me know if there are any questions.
Note: this assumes the change of scheme is done in the evolution basis, not sure whether it is what you guys had in mind but since this is not the final form I would be very much happier if tests using this branch happen there. In the file 'n3fit/layers/Rotation.py' you can find to which flavour corresponds which index.