Source

2012-issac-yt / time_series_multilevel.py

Full commit
from yt.mods import *
import glob

filenames = glob.glob("*/*.hierarchy")
filenames.sort()
ts = TimeSeriesData.from_filenames(filenames, parallel=4)

storage = {}
for sto, pf in ts.piter(storage=storage):
    dd = pf.h.all_data()
    rho_ex, V_ex = dd.quantities["Extrema"](["Density","VelocityMagnitude"])
    sto.result = rho_ex, V_ex

min_rho = min(v[0][0] for v in storage.values())
max_rho = max(v[0][1] for v in storage.values())
min_V = min(v[1][0] for v in storage.values())
max_V = max(v[1][1] for v in storage.values())

print min_V, max_V
print min_rho, max_rho