|
@@ -4,29 +4,29 @@ operations = {}
|
|
|
|
|
|
with open("calibration/result", 'r') as f:
|
|
|
for l in f:
|
|
|
- op, t = l.split(": ")
|
|
|
- t = float(t)
|
|
|
- operations.setdefault(op, []).append(t)
|
|
|
+ try:
|
|
|
+ op, t = l.split(": ")
|
|
|
+ t = float(t)
|
|
|
+ operations.setdefault(op, []).append(t)
|
|
|
+ except:
|
|
|
+ pass
|
|
|
|
|
|
with open("calibration/averages", 'w') as averages:
|
|
|
with open("calibration/plot", 'w') as plot:
|
|
|
for op in operations:
|
|
|
avg = sum(operations[op]) / len(operations[op])
|
|
|
op_min = 0.0
|
|
|
- op_max = avg * 3
|
|
|
+ op_max = max(operations[op])
|
|
|
new_list = []
|
|
|
|
|
|
with open("calibration/distribution_%s" % op, 'w') as f:
|
|
|
for t in sorted(operations[op]):
|
|
|
- if t < op_max:
|
|
|
- f.write("%f\n" % t)
|
|
|
- new_list.append(t)
|
|
|
+ f.write("%f\n" % t)
|
|
|
|
|
|
- avg = sum(new_list) / len(new_list)
|
|
|
- averages.write("%20s: %f\n" % (op, avg))
|
|
|
+ averages.write("%20s: %.17f\n" % (op, avg))
|
|
|
|
|
|
plot.write("set terminal postscript enhanced colour portrait size 6,6\n")
|
|
|
- plot.write("n = 20\n")
|
|
|
+ plot.write("n = 2000\n")
|
|
|
plot.write("min=%s\n" % op_min)
|
|
|
plot.write("max=%s\n" % op_max)
|
|
|
plot.write("width=(max-min)/n\n")
|