[Yt-svn] yt: EnzoFOF lists should have 5 digits for the identifier and fi...

hg at spacepope.org hg at spacepope.org
Thu Jan 13 12:04:27 PST 2011


hg Repository: yt
details:   yt/rev/4216f135f635
changeset: 3655:4216f135f635
user:      John Wise <jwise at astro.princeton.edu>
date:
Thu Jan 13 15:04:17 2011 -0500
description:
EnzoFOF lists should have 5 digits for the identifier and fixed an
uninitialized variable.

diffstat:

 yt/analysis_modules/halo_merger_tree/enzofof_merger_tree.py |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r bf277632bfed -r 4216f135f635 yt/analysis_modules/halo_merger_tree/enzofof_merger_tree.py
--- a/yt/analysis_modules/halo_merger_tree/enzofof_merger_tree.py	Thu Jan 13 14:41:06 2011 -0500
+++ b/yt/analysis_modules/halo_merger_tree/enzofof_merger_tree.py	Thu Jan 13 15:04:17 2011 -0500
@@ -96,13 +96,13 @@
             true, the correct particle files must exist.
         """
         self.output_id = output_id
-        self.particle_file = h5py.File("FOF/particles_%04i.h5" % output_id, "r")
+        self.particle_file = h5py.File("FOF/particles_%05i.h5" % output_id, "r")
         self.parse_halo_catalog()
         if cache: self.cache = dict()#MaxLengthDict()
 
     def parse_halo_catalog(self):
         hp = []
-        for line in open("FOF/groups_%04i.dat" % self.output_id):
+        for line in open("FOF/groups_%05i.dat" % self.output_id):
             if line.strip() == "": continue # empty
             if line[0] == "#": continue # comment
             if line[0] == "d": continue # datavar
@@ -126,7 +126,7 @@
         mylog.debug("Ball-tree query with radius %0.3e", radius)
         all_nearest = self.halo_kdtree.query_ball_tree(
             other_catalog.halo_kdtree, radius)
-        pbar = get_pbar("Halo Mergers", HC1.halo_positions.shape[0])
+        pbar = get_pbar("Halo Mergers", self.halo_positions.shape[0])
         for hid1, nearest in enumerate(all_nearest):
             pbar.update(hid1)
             parentage_fractions[hid1] = {}



More information about the yt-svn mailing list