[yt-users] Iteration Problems

Stephen Skory stephenskory at yahoo.com
Mon Jun 28 14:28:46 PDT 2010


Hi all,

so it looks like Brian Crosby's problem is that in order to run a multiple-cycle halo finding script, the halos object needs to be explicitly deleted. This is probably my fault with all the various levels of referencing done in halo finding, but for the time being, a script like this will *not* run away in memory. I've confirmed this on both Ranger & Triton for yt-1.7.

----

from yt.mods import *

for n in range(0,28):
    pf = load("RD%04i/RedshiftOutput%04i" % (n,n))
    halos = HaloFinder(pf,padding=0.1)
    halos.write_out("RD%04i/MergerHalos%04i.txt" % (n,n))
    halos.write_particle_lists("RD%04i/MergerHalos%04i" % (n,n))
    halos.write_particle_lists_txt("RD%04i/MergerHalos%04i" % (n,n))
    del halos

---


(p.s. Brian Crosby - please note that this is based on your halos.py script on Ranger, but you missed the dir names in the output commands. Without them you're just over-writing your old work!) _______________________________________________________
sskory at physics.ucsd.edu           o__  Stephen Skory
http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student
________________________________(_)_\(_)_______________




More information about the yt-users mailing list