Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
McMule
User Library
Commits
14ea00fd
Commit
14ea00fd
authored
Apr 01, 2020
by
ulrich_y
Browse files
Towards Python3 compliance
parent
be118008
Pipeline
#912
passed with stages
in 5 minutes and 8 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
15 deletions
+13
-15
michel-decay/arbuzov.py
michel-decay/arbuzov.py
+3
-5
michel-decay/f-and-g/f-and-g.py
michel-decay/f-and-g/f-and-g.py
+4
-4
mu-e-scattering/muone/muone.py
mu-e-scattering/muone/muone.py
+2
-2
radiative-lepton-decay/babar/example/example.py
radiative-lepton-decay/babar/example/example.py
+3
-3
tools/py2nb.py
tools/py2nb.py
+1
-1
No files found.
michel-decay/arbuzov.py
View file @
14ea00fd
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
.
iter
items
():
for
key
,
value
in
b
.
items
():
globals
()[
key
]
=
eval
(
value
)
...
...
michel-decay/f-and-g/f-and-g.py
View file @
14ea00fd
...
...
@@ -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{{{
...
...
mu-e-scattering/muone/muone.py
View file @
14ea00fd
...
...
@@ -147,8 +147,8 @@ kfac = [
aconnlo
[
'value'
][
0
]
/
aconlo
[
'value'
][
0
]
]
entries
.
insert
(
0
6
,
kfac
[
0
])
entries
.
insert
(
0
7
,
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
])
...
...
radiative-lepton-decay/babar/example/example.py
View file @
14ea00fd
...
...
@@ -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
(
...
...
tools/py2nb.py
View file @
14ea00fd
...
...
@@ -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
=
"."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment