Source

yt.geometry_tests / compare.py

Full commit
import pylab

def gv(fn, dd):
    for line in open(fn):
        if line.startswith("STATS"):
            vals = line.split()
            dd[vals[1]] = (float(vals[3]), float(vals[5][:-1]),
                           float(vals[6][1:-2]))

old = {}
new = {}

gv("ytrf.out", new)
#gv("ytnrf.out", old)
gv("ytrft.out", old)

for k in new:
    nv = new[k]
    ov = old[k]
    print "% 15s:  %0.3es %0.3f(n/o) %0.3e delta % 10i delta cells" % (
        k, nv[0], nv[0]/ov[0], nv[1]/ov[1], nv[2]-ov[2])