[Yt-svn] yt: Halo maximum density location fix.

hg at spacepope.org hg at spacepope.org
Thu Apr 29 16:27:40 PDT 2010


hg Repository: yt
details:   yt/rev/de49046e223b
changeset: 1631:de49046e223b
user:      Stephen Skory <stephenskory at yahoo.com>
date:
Thu Apr 29 16:24:07 2010 -0700
description:
Halo maximum density location fix.

diffstat:

 yt/lagos/HaloFinding.py |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r a203d38d27eb -r de49046e223b yt/lagos/HaloFinding.py
--- a/yt/lagos/HaloFinding.py	Thu Apr 29 12:09:28 2010 -0700
+++ b/yt/lagos/HaloFinding.py	Thu Apr 29 16:24:07 2010 -0700
@@ -308,8 +308,7 @@
         Return the location HOP identified as maximally dense.
         """
         if self.max_dens_point is not None:
-            return na.array([self._max_dens[self.id][1], self._max_dens[self.id][2],
-                self._max_dens[self.id][3]])
+            return self.max_dens_point[1:]
         # If I own the maximum density, my location is globally correct.
         max_dens = self.maximum_density()
         if self._max_dens[self.id][0] == max_dens:
@@ -1110,6 +1109,8 @@
                 sorted_max_dens[i] = self._max_dens[halo.id]
             halo.id = i
         self._max_dens = sorted_max_dens
+        for i, halo in enumerate(self._groups):
+            halo._max_dens = self._max_dens
         
     def _reposition_particles(self, bounds):
         # This only does periodicity.  We do NOT want to deal with anything



More information about the yt-svn mailing list