now really done with stability stats stuff
--HG-- extra : convert_revision : 9bdbcec972f5d06e3ecd99c418fcccfaef7f6f3a
This commit is contained in:
parent
24bfd5ef01
commit
cbbbc9c57d
1 changed files with 15 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
import re, sys
|
import re, sys, math
|
||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
print '''\
|
print '''\
|
||||||
|
@ -257,10 +257,11 @@ def commands(options, command, args):
|
||||||
for stat in stats:
|
for stat in stats:
|
||||||
|
|
||||||
print "%s:" % stat.name
|
print "%s:" % stat.name
|
||||||
print "%-30s %12s %12s %4s %5s %6s" % \
|
print "%-30s %12s %12s %4s %5s %5s %5s" % \
|
||||||
("run name", "average", "stdev", ">10%", ">1SDV", "SAMP")
|
("run name", "average", "stdev", ">10%", ">1SDV", ">2SDV", "SAMP")
|
||||||
print "%-30s %12s %12s %4s %5s %6s" % \
|
print "%-30s %12s %12s %4s %5s %5s %5s" % \
|
||||||
("------------------------------", "------------", "------------", "----", "-----", "------")
|
("------------------------------", "------------",
|
||||||
|
"------------", "----", "-----", "-----", "-----")
|
||||||
#loop through all the selected runs
|
#loop through all the selected runs
|
||||||
for run in runs:
|
for run in runs:
|
||||||
info.display_run = run.run;
|
info.display_run = run.run;
|
||||||
|
@ -271,6 +272,8 @@ def commands(options, command, args):
|
||||||
avg = float(stat)
|
avg = float(stat)
|
||||||
stdev = 0
|
stdev = 0
|
||||||
numoutsideavg = 0
|
numoutsideavg = 0
|
||||||
|
numoutside1std = 0
|
||||||
|
numoutside2std = 0
|
||||||
|
|
||||||
#loop through all the various ticks for each run
|
#loop through all the various ticks for each run
|
||||||
for tick in runTicks:
|
for tick in runTicks:
|
||||||
|
@ -280,18 +283,19 @@ def commands(options, command, args):
|
||||||
numoutsideavg += 1
|
numoutsideavg += 1
|
||||||
stdev += pow((val-avg),2)
|
stdev += pow((val-avg),2)
|
||||||
|
|
||||||
stdev = pow(stdev / len(runTicks), 0.5)
|
stdev = math.sqrt(stdev / len(runTicks))
|
||||||
numoutsidestd = 0
|
|
||||||
for tick in runTicks:
|
for tick in runTicks:
|
||||||
stat.ticks = str(tick)
|
stat.ticks = str(tick)
|
||||||
val = float(stat)
|
val = float(stat)
|
||||||
if (val < (avg - stdev)) or (val > (avg + stdev)):
|
if (val < (avg - stdev)) or (val > (avg + stdev)):
|
||||||
numoutsidestd += 1
|
numoutside1std += 1
|
||||||
|
if (val < (avg - (2*stdev))) or (val > (avg + (2*stdev))):
|
||||||
|
numoutside2std += 1
|
||||||
|
|
||||||
print "%-30s %12s %12s %4s %5s %6s" % \
|
print "%-30s %12s %12s %4s %5s %5s %5s" % \
|
||||||
(run.name, "%.1f" % avg, "%.1f" % stdev,
|
(run.name, "%.1f" % avg, "%.1f" % stdev,
|
||||||
"%d" % numoutsideavg, "%d" % numoutsidestd,
|
"%d" % numoutsideavg, "%d" % numoutside1std,
|
||||||
"%d" % len(runTicks))
|
"%d" % numoutside2std, "%d" % len(runTicks))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue