17 lines
796 B
Python
17 lines
796 B
Python
import sys, collections
|
|
sys.path.insert(0, 'lesen')
|
|
import glueck
|
|
rows = collections.defaultdict(list)
|
|
for line in open(sys.argv[1]):
|
|
o, net, luck, h1, h2 = line.split()
|
|
rows[o].append((float(net), float(luck), [h1, h2]))
|
|
alle = []
|
|
for o, r in list(rows.items()) + [('alle', None)]:
|
|
r = r if r is not None else [x for v in rows.values() for x in v]
|
|
y = [x[0] for x in r]
|
|
c = [glueck.kontrollwert(x[2]) for x in r]
|
|
roh = glueck.schaetzen(y, [0.0] * len(y))
|
|
hk = glueck.schaetzen(y, c)
|
|
voll = glueck.schaetzen([a - b for a, b, _ in r], [0.0] * len(y))
|
|
print(f"{o:8s} n={len(r):6d} roh {roh['bb100']:+8.1f} ±{roh['halb95']:6.1f} | Starthand {hk['bb100']:+8.1f} ±{hk['halb95']:6.1f} (beta {hk['beta']:.1f}) | voll {voll['bb100']:+8.1f} ±{voll['halb95']:6.1f}")
|