[Yt-svn] yt-commit r1349 - trunk/yt/raven

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Thu Jun 18 10:20:09 PDT 2009


Author: mturk
Date: Thu Jun 18 10:20:07 2009
New Revision: 1349
URL: http://yt.spacepope.org/changeset/1349

Log:
Fixing a bug with the NewParticleCallback where the region was never set.



Modified:
   trunk/yt/raven/Callbacks.py

Modified: trunk/yt/raven/Callbacks.py
==============================================================================
--- trunk/yt/raven/Callbacks.py	(original)
+++ trunk/yt/raven/Callbacks.py	Thu Jun 18 10:20:07 2009
@@ -47,8 +47,6 @@
         x0, x1 = plot.xlim
         y0, y1 = plot.ylim
         l, b, width, height = _get_bounds(plot._axes.bbox)
-        xi = lagos.x_dict[plot.data.axis]
-        yi = lagos.y_dict[plot.data.axis]
         dx = plot.image._A.shape[0] / (x1-x0)
         dy = plot.image._A.shape[1] / (y1-y0)
         return ((coord[0] - int(offset)*x0)*dx,
@@ -865,12 +863,12 @@
         LE[zax] = data.center[zax] - self.width*0.5
         RE[zax] = data.center[zax] + self.width*0.5
         if self.region is not None \
-            and self.region.left_edge <= LE \
-            and self.region.right_edge >= RE:
+            and na.all(self.region.left_edge <= LE) \
+            and na.all(self.region.right_edge >= RE):
             return self.region
-        region = data.pf.h.periodic_region(
+        self.region = data.pf.h.periodic_region(
             data.center, LE, RE)
-        return region
+        return self.region
 
 class TitleCallback(PlotCallback):
     _type_name = "title"



More information about the yt-svn mailing list