Skip to content

LO polarised anomalous dimension#170

Closed
giacomomagni wants to merge 16 commits into
developfrom
polarised_implementation
Closed

LO polarised anomalous dimension#170
giacomomagni wants to merge 16 commits into
developfrom
polarised_implementation

Conversation

@giacomomagni
Copy link
Copy Markdown
Collaborator

This PR is for the implementation of LO polarised anomalous dimension.

@giacomomagni giacomomagni added physics new physics features enhancement New feature or request labels Nov 26, 2022
@giacomomagni giacomomagni marked this pull request as draft November 26, 2022 13:37
@alecandido
Copy link
Copy Markdown
Collaborator

alecandido commented Nov 26, 2022

Why did you put it in a new package?

Since they will share almost everything with eko, apart from the anomalous dimensions themselves, I would put together everything else:

eko
|- anomalous_dimensions/
| |- unpolarized/
| | |- ...
| |- polarized/
| | |- ...

We do not want to duplicate the code, and having to maintain two copies...

@giacomomagni
Copy link
Copy Markdown
Collaborator Author

Why did you put it in a new package?

Hi @alecandido, I think this was done by mistake.
This PR is just to keep track of the work done by @adrianneschauss, but for the moment it's just a draft.
I've already warned her about a couple of good practice tips.

@alecandido
Copy link
Copy Markdown
Collaborator

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...
If you wish, I can just review the final product :)

@alecandido
Copy link
Copy Markdown
Collaborator

Thank you, @adrianneschauss, for solving the major issue.

About the new modules asp1.py and apem1.py:

  • naming is currently inconsistent, use:
    1. asp and aemp (preferred, by me), or
    2. aps and apem
  • in any case, I would drop the p from the module, and just use the organization proposed above, with a further subdivision in folders between polarized and unpolarized

The idea is that just relying on a p is a bit confusing, and:

Explicit is better than implicit.

However, it is definitely not urgent, please take your time :)

@felixhekhorn
Copy link
Copy Markdown
Collaborator

and just use the organization proposed above, with a further subdivision in folders between polarized and unpolarized

definitely 🙃 remember that @t7phy is working in parallel on the time-like unpolarized part - so you should move into polarized/space_like/* and @t7phy into unpolarized/time_like/* (later we need also to move the current content to unpolarized/space_like)

@felixhekhorn felixhekhorn linked an issue Dec 6, 2022 that may be closed by this pull request
from ..kernels import non_singlet as ns
from ..kernels import singlet as s
from ..member import OpMember
from scipy import integrate
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-commit (i.e. isort) should put it back in the former place, please run:

pre-commit install

in the local instance of your repository.

Comment thread src/eko/evolution_operator/__init__.py Outdated
nf : int
number of active flavors
p : Boolean
Polarised (True) or un-Polarised (False)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/eko/test_ad.py

def test_gamma_ns():
nf = 3
p = False
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)`
"""
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not so trivial, since many of the higher order functions require a non-trivial combination of S-es

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But they were getting access to an S-cache, isn't it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/eko/test_ad_asp1.py Outdated
Comment on lines +54 to +99














# #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),
# ]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the fix is repeated, you see the pattern. If we see the pattern, let's refactor this @felixhekhorn

Comment thread README.md Outdated
Comment thread .gitignore Outdated
Comment thread src/eko/anomalous_dimensions/aem1.py Outdated
@alecandido
Copy link
Copy Markdown
Collaborator

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.

adrianneschauss and others added 4 commits December 23, 2022 11:11
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>
Comment thread .gitignore Outdated
Comment thread README.md Outdated
Comment thread src/eko/anomalous_dimensions/aem1.py Outdated
Comment on lines +10 to +17
# @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
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# @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

Comment thread src/eko/anomalous_dimensions/asp1.py Outdated
Comment thread src/eko/anomalous_dimensions/asp1.py Outdated
@felixhekhorn felixhekhorn mentioned this pull request Jan 6, 2023
20 tasks
giacomomagni and others added 2 commits January 9, 2023 11:42
Co-authored-by: Giacomo Magni <39065935+giacomomagni@users.noreply.github.com>
adrianneschauss and others added 3 commits January 11, 2023 15:02
@giacomomagni
Copy link
Copy Markdown
Collaborator Author

clesed in favor of #195

@giacomomagni giacomomagni deleted the polarised_implementation branch January 31, 2023 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request physics new physics features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

polarized setup

4 participants