예제 #1
0
if 'toe' in sys.argv:
    dataformat = 'data/lv/ww%.2f-ff%.2f-%gx%g-toe-movie/%%06d' % (ww, ff, lenx,
                                                                  lenyz)

for frame in range(100000):
    basename = dataformat % frame
    try:
        e, lndos = readandcompute.e_lndos(basename)
    except:
        break
    numframes = frame + 1
    minlndos = min(minlndos, lndos.min())
    maxlndos = max(maxlndos, lndos.max())

    try:
        e, hist = readandcompute.e_and_total_init_histogram(basename)
    except:
        break
    mine = min(mine, e.min() - 20)
    maxe = max(maxe, e.max())

print('mine', mine)
print('maxe', maxe)
print('minlndos', minlndos)
print('maxlndos', maxlndos)
print('numframes', numframes)

for frame in range(numframes):
    if frame % 10 == 0:
        print('working on frame %d/%d' % (frame, numframes))
    plt.cla()
예제 #2
0
fig, ax = plt.subplots()

mine = 1e100
maxe = -1e100
maxhist = 0
numframes = 0

dataformat = 'data/%s/%s-%%s-movie/%%06d' % (subdirname, filename)
colors = ['k', 'b', 'r', 'g']

for frame in xrange(100000):
    for suffix in suffixes:
        basename = dataformat % (suffix, frame)
        try:
            e, hist = readandcompute.e_and_total_init_histogram(basename)
        except (KeyboardInterrupt, SystemExit):
            raise
        except:
            break
        numframes = frame+1
        maxhist = max(maxhist, hist.max())
        mine = min(mine, e.min() - 20)
        maxe = max(maxe, e.max())
    if numframes % 25 == 0:
        print 'counting %dth frame' % numframes

print 'mine', mine
print 'maxe', maxe
print 'maxhist', maxhist