[Yt-svn] yt-commit r1812 - trunk/yt/extensions

sskory at wrangler.dreamhost.com sskory at wrangler.dreamhost.com
Fri Aug 27 16:21:12 PDT 2010


Author: sskory
Date: Fri Aug 27 16:21:11 2010
New Revision: 1812
URL: http://yt.enzotools.org/changeset/1812

Log:
Fixing a bug in the merger tree.

Modified:
   trunk/yt/extensions/merger_tree.py

Modified: trunk/yt/extensions/merger_tree.py
==============================================================================
--- trunk/yt/extensions/merger_tree.py	(original)
+++ trunk/yt/extensions/merger_tree.py	Fri Aug 27 16:21:11 2010
@@ -777,8 +777,8 @@
         self.cursor.execute(string)
         results = self.cursor.fetchone()
         while results:
-            if results[1] < minz:
-                minz = results[1]
+            if abs(results[1] - z) < minz:
+                minz = abs(results[1] - z)
                 this_halo = results[0]
             results = self.cursor.fetchone()
         return this_halo



More information about the yt-svn mailing list