LO polarised anomalous dimension#170
Conversation
|
Why did you put it in a new package? Since they will share almost everything with We do not want to duplicate the code, and having to maintain two copies... |
Hi @alecandido, I think this was done by mistake. |
|
Ok, I guess you can take care of it: I know it was draft, but I didn't want the final product to go in that direction (let's say that I've been rather astonished when I saw 87 files changed...). Sorry if I stepped in to early... |
|
Thank you, @adrianneschauss, for solving the major issue. About the new modules
The idea is that just relying on a
However, it is definitely not urgent, please take your time :) |
definitely 🙃 remember that @t7phy is working in parallel on the time-like unpolarized part - so you should move into |
| from ..kernels import non_singlet as ns | ||
| from ..kernels import singlet as s | ||
| from ..member import OpMember | ||
| from scipy import integrate |
There was a problem hiding this comment.
pre-commit (i.e. isort) should put it back in the former place, please run:
pre-commit installin the local instance of your repository.
| nf : int | ||
| number of active flavors | ||
| p : Boolean | ||
| Polarised (True) or un-Polarised (False) |
There was a problem hiding this comment.
Unfortunately I believe that introducing a boolean is the correct way at the moment (or equally bad to introducing a parallel dispatcher), but eventually I believe we want to get rid of dispatchers at all, at least not keep using them as they are meant now (as a single entry point for Numba).
This will be addressed by refactoring after the analogue of #123 will be implemnted.
|
|
||
| def test_gamma_ns(): | ||
| nf = 3 | ||
| p = False |
There was a problem hiding this comment.
As already noticed in #184 these tests contains a lot of repetitions. We want to refactor limiting the amount of repetitions as you would for normal code.
E.g. here you can do it by looping over orders and outputs, without repeating very similar calls over and over.
| ------- | ||
| gamma_qg : complex | ||
| Leading-order polarised quark-gluon anomalous dimension :math:`\\gamma_{qg}^{(0)}(N)` | ||
| """ |
There was a problem hiding this comment.
This is more targeted to @felixhekhorn: I propose to drop Parameters and Returns sections, since they are quite verbose and redundant.
We will replace by the specification of a common interface (or a scheme for possible interfaces) in the module/subpackage docstrings.
With "interface" I mean the io = parameters + returns
There was a problem hiding this comment.
this is not so trivial, since many of the higher order functions require a non-trivial combination of S-es
There was a problem hiding this comment.
But they were getting access to an S-cache, isn't it?
There was a problem hiding this comment.
However, in case they are variables, we can agree on a naming scheme for them. Once they adhere to the naming scheme, they do not need to be documented one by one.
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| # #declare parameter values | ||
| # order= (1, 0) | ||
| # n = complex(1.0, 1.0) | ||
| # nf= 4 | ||
| # p = False | ||
| # a1= 2 | ||
| # a0 = 1 | ||
| # #modes used | ||
| # mode0=br.non_singlet_pids_map["ns+"] | ||
| # mode1=0 | ||
|
|
||
| # #using anomalous dimensions singlet, make that matrix | ||
| # gamma_s= gamma_singlet(order, n, nf, p) | ||
| # #make the evolution kernel with starting and ending energy | ||
| # j00= np.log(a1 / a0) / beta.beta_qcd((2, 0), nf) | ||
| # lo_ex = ad.exp_singlet(gamma_s[0] * j00) | ||
| # print (lo_ex) | ||
| # ker_s = lo_ex | ||
| # print(np.shape(ker_s)) | ||
| # k = 0 if mode0 == 100 else 1 | ||
| # l = 0 if mode1 == 100 else 1 | ||
| # print(k) | ||
| # print(l) | ||
| # select_el= ker_s[k] | ||
| # print (select_el) | ||
|
|
||
| # spec = [ | ||
| # ("is_singlet", nb.boolean), | ||
| # ("is_log", nb.boolean), | ||
| # ("logx", nb.float64), | ||
| # ("u", nb.float64), | ||
| # ] |
There was a problem hiding this comment.
I guess this has been copied from somewhere.
We can drop here, and in case also in the place this was taken from.
| as0=2, | ||
| as_raw=1, | ||
| nf=3, | ||
| p=False, |
There was a problem hiding this comment.
Since the fix is repeated, you see the pattern. If we see the pattern, let's refactor this @felixhekhorn
|
The style is rather similar to the current one of EKO, and generally good. Most possible improvements are shared with the rest of the package, apart from negotiating the structure of this new part. |
Co-authored-by: Alessandro Candido <candido.ale@gmail.com>
Co-authored-by: Alessandro Candido <candido.ale@gmail.com>
Co-authored-by: Alessandro Candido <candido.ale@gmail.com>
| # @nb.njit(cache=True) | ||
| # def gamma_pns(N, s1): | ||
| # Computes the leading-order non-singlet anomalous dimension for the polarised case. | ||
| # This is going to be the same expression as the one for the unpolarised case. | ||
|
|
||
| # gamma = -(3.0 - 4.0 * s1 + 2.0 / N / (N + 1.0)) | ||
| # result = constants.CF * gamma | ||
| # return result |
There was a problem hiding this comment.
| # @nb.njit(cache=True) | |
| # def gamma_pns(N, s1): | |
| # Computes the leading-order non-singlet anomalous dimension for the polarised case. | |
| # This is going to be the same expression as the one for the unpolarised case. | |
| # gamma = -(3.0 - 4.0 * s1 + 2.0 / N / (N + 1.0)) | |
| # result = constants.CF * gamma | |
| # return result |
Co-authored-by: Giacomo Magni <39065935+giacomomagni@users.noreply.github.com>
Co-authored-by: Giacomo Magni <39065935+giacomomagni@users.noreply.github.com>
…polarised_implementation
|
clesed in favor of #195 |
This PR is for the implementation of LO polarised anomalous dimension.