Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 14ea00fd authored by ulrich_y's avatar ulrich_y
Browse files

Towards Python3 compliance

parent be118008
No related branches found
No related tags found
No related merge requests found
Pipeline #912 passed
import requests
import zlib
import numpy as np
import StringIO
import tarfile
import pymule.maths
import sys
......@@ -10,10 +9,12 @@ import re
import bz2
import os
try:
import StringIO
import sympy as sp
import sympy.parsing.latex
import scipy.special
Printer = sys.modules['sympy.printing.pycode'].NumPyPrinter
x, xe, beta, z = sp.var('x xe beta z')
except ImportError:
pass
......@@ -90,9 +91,6 @@ def parse(lines, s):
.replace('beta(', 'beta*(')[s:-1]).subs('x', 'xe')
x, xe, beta, z = sp.var('x xe beta z')
def load0110047():
"""
This loads hep-ph/0110047, i.e. the NLO paper
......@@ -259,7 +257,7 @@ def loadall(f='arbuzov.json.bz2'):
def loadfile(f='arbuzov.json.bz2'):
with bz2.BZ2File(f) as fp:
b = json.load(fp)
for key, value in b.iteritems():
for key, value in b.items():
globals()[key] = eval(value)
......
......@@ -332,10 +332,10 @@ resg2 = fitep(divideplots(gnnlo, glo), 2, "$g_2$")
ylim(-2e-2, 2e-2)
#################################################}}}
#### Compare with resummation{{{
print "Agreement for f1: ", printnumber(resf1[3]/eplogcoeff)
print "Agreement for g1: ", printnumber(resg1[3]/eplogcoeff)
print "Agreement for f2: ", printnumber(resf2[4]/(eplogcoeff**2/2))
print "Agreement for g2: ", printnumber(resg2[4]/(eplogcoeff**2/2))
print("Agreement for f1: " + printnumber(resf1[3]/eplogcoeff))
print("Agreement for g1: " + printnumber(resg1[3]/eplogcoeff))
print("Agreement for f2: " + printnumber(resf2[4]/(eplogcoeff**2/2)))
print("Agreement for g2: " + printnumber(resg2[4]/(eplogcoeff**2/2)))
#################################################}}}
###########################################################}}}
### Calculate YFS spectrum{{{
......
......@@ -147,8 +147,8 @@ kfac = [
aconnlo['value'][0] / aconlo['value'][0]
]
entries.insert(06, kfac[0])
entries.insert(07, kfac[1])
entries.insert(6, kfac[0])
entries.insert(7, kfac[1])
entries.insert(12, kfac[2])
entries.insert(13, kfac[3])
entries.insert(18, kfac[4])
......
......@@ -27,9 +27,9 @@ NLO = scaleset(mergefks(
fullNLO = plusnumbers(LO['value'], NLO['value'])
# Print results
print "BR_0 = ", printnumber(LO['value'])
print "dBR = ", printnumber(NLO['value'])
print "BR_1 = ", printnumber(fullNLO)
print("BR_0 = " + printnumber(LO['value']))
print("dBR = " + printnumber(NLO['value']))
print("BR_1 = " + printnumber(fullNLO))
###########################################################}}}
### $E_e$ plot{{{
fig1, (ax1, ax2) = kplot(
......
......@@ -135,7 +135,7 @@ def main():
nb = py2nb(args.input.read())
if args.x:
print "Executing ",args.input.name
print("Executing " + args.input.name)
dir = os.path.dirname(name)
if len(dir) == 0:
dir = "."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment