Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate functions #3

Open
klieret opened this issue Oct 23, 2018 · 1 comment
Open

Consolidate functions #3

klieret opened this issue Oct 23, 2018 · 1 comment

Comments

@klieret
Copy link
Member

klieret commented Oct 23, 2018

This is not too important, but currently we are defining a lot of single functions with cryptic names that cover some cases, e.g.

def Gammap0(w: Wilson, q2, El):
    return 2 * Gammat0p(w, q2, El)


def Gammam0(w: Wilson, q2, El):
    return 2 * Gamma0m(w, q2, El)


def Gammam2(w: Wilson, q2, El):
    return -2 * Gamma0m(w, q2, El)


def Gammap2(w: Wilson, q2, El):
    return 2 * Gamma00p(w, q2, El)


def Gammam1(w: Wilson, q2, El):
    return 0.


def Gammap1(w: Wilson, q2, El):
    return 2 * GammaI0p(w, q2, El)

for me it would perhaps be clearer if we implement that in one function:

def Gamma(sign, number, w, q2, El):
    if sign == "+" and  number == 1:
         return blah
   else if:
         return bluh
    ....
    else:
           raise ValueError
@celis
Copy link

celis commented Oct 23, 2018

yes thats a good idea

@klieret klieret transferred this issue from clusterking/clusterking May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants