Source

yt.geometry_tests / get_coords.py

Full commit
from yt.mods import *
pf = load("DD0039/output_0039")
#dd = pf.h.all_data()
dd = pf.h.sphere("max", (100.0, 'pc'))
icoords = {}
for t in ["io", "all", "spatial"]:
    icoords[t] = []
    for chunk in dd.chunks(None, t):
        icoords[t].append(chunk._current_chunk.fcoords(1))
    icoords[t] = na.concatenate(icoords[t])
    icoords[t].sort()

for t, ic in sorted(icoords.items()):
    #print "% 10s % 15i % 15i % 15i" % (t, ic.min(), ic.max(), ic.sum())
    print "% 10s % 5.7f % 5.7f % 5.7f" % (t, ic.min(), ic.max(), ic.sum())