Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fastNLO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qcd-public
fastNLO
Commits
58ae18e6
Commit
58ae18e6
authored
1 year ago
by
Klaus Rabbertz
Browse files
Options
Downloads
Patches
Plain Diff
Start updating fnlo-compare-ab.py for py3
parent
a94c8df8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/plotting/fnlo-compare-ab.py
+14
-14
14 additions, 14 deletions
tools/plotting/fnlo-compare-ab.py
with
14 additions
and
14 deletions
tools/plotting/fnlo-compare-ab.py
+
14
−
14
View file @
58ae18e6
#!/usr/bin/env python
2
#!/usr/bin/env python
3
#-*- coding:utf-8 -*-
#
# Make comparison plots between two predictions
...
...
@@ -15,7 +15,7 @@ import glob
import
os
import
re
import
sys
from
StringIO
import
StringIO
from
io
import
StringIO
import
matplotlib.lines
as
mpllines
import
matplotlib.gridspec
as
gridspec
import
matplotlib.patches
as
mplpatches
...
...
@@ -30,9 +30,9 @@ import numpy as np
#from fnlo_parsers import FNLOCppReadOutputParser
#from fnlo_parsers import FNLOYodaOutputParser
# fastNLO
#
import fastnlo
#
from fastnlo import fastNLOLHAPDF
#
from fastnlo import SetGlobalVerbosity
import
fastnlo
from
fastnlo
import
fastNLOLHAPDF
from
fastnlo
import
SetGlobalVerbosity
# Redefine ScalarFormatter
...
...
@@ -105,16 +105,16 @@ def main():
exit
(
0
)
# Extract no. of columns from files
print
'
Reading no. of columns from 1st file
'
,
afile
print
(
'
Reading no. of columns from 1st file
'
,
afile
)
cols
=
np
.
loadtxt
(
afile
,
comments
=
[
'
#
'
,
'
#
'
,
'
C
'
,
'
L
'
])
nacol
=
cols
.
shape
[
1
]
print
'
Found
'
,
nacol
,
'
columns
'
print
'
Reading no. of columns from 2nd file
'
,
bfile
print
(
'
Found
'
,
nacol
,
'
columns
'
)
print
(
'
Reading no. of columns from 2nd file
'
,
bfile
)
cols
=
np
.
loadtxt
(
bfile
,
comments
=
[
'
#
'
,
'
#
'
,
'
C
'
,
'
L
'
])
nbcol
=
cols
.
shape
[
1
]
print
'
Found
'
,
nbcol
,
'
columns
'
print
(
'
Found
'
,
nbcol
,
'
columns
'
)
if
nacol
!=
nbcol
:
print
'
Different no. of columns found, aborted!
'
print
(
'
Different no. of columns found, aborted!
'
)
exit
(
1
)
ncol
=
nacol
...
...
@@ -125,7 +125,7 @@ def main():
iobsb
,
bwb
,
id0b
,
xlb
,
xub
,
xaveb
,
xsb_lo
,
xsb_nlo
,
kb_nlo
=
np
.
loadtxt
(
bfile
,
comments
=
[
'
#
'
,
'
#
'
,
'
C
'
,
'
L
'
],
dtype
=
[(
'
f0
'
,
int
),
(
'
f1
'
,
float
),
(
'
f2
'
,
int
),
(
'
f3
'
,
float
),
(
'
f4
'
,
float
),
(
'
f5
'
,
float
),
(
'
f6
'
,
float
),
(
'
f7
'
,
float
),
(
'
f8
'
,
float
)],
unpack
=
True
)
else
:
print
'
ncol different from 9 not yet implemented. Aborted!
'
print
(
'
ncol different from 9 not yet implemented. Aborted!
'
)
exit
(
2
)
exit
(
0
)
...
...
@@ -136,10 +136,10 @@ nvala = iobsa.size
nvalb
=
iobsb
.
size
nobsa
=
max
(
iobsa
)
nobsb
=
max
(
iobsb
)
print
'
Found
'
,
nvala
,
'
result lines for
'
,
nobsa
,
'
observable bins in file
'
,
afile
print
'
Found
'
,
nvalb
,
'
result lines for
'
,
nobsb
,
'
observable bins in file
'
,
bfile
print
(
'
Found
'
,
nvala
,
'
result lines for
'
,
nobsa
,
'
observable bins in file
'
,
afile
)
print
(
'
Found
'
,
nvalb
,
'
result lines for
'
,
nobsb
,
'
observable bins in file
'
,
bfile
)
if
nvala
!=
nvalb
or
nobsa
!=
nobsb
:
print
'
nval or nobs different between the two files to compare, aborted!
'
print
(
'
nval or nobs different between the two files to compare, aborted!
'
)
exit
(
3
)
nobs
=
nobsa
nval
=
nvala
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment