[Yt-svn] yt-commit r1354 - branches/yt-1.5/yt/raven trunk/yt/raven
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Tue Jun 23 11:24:22 PDT 2009
Author: mturk
Date: Tue Jun 23 11:24:21 2009
New Revision: 1354
URL: http://yt.spacepope.org/changeset/1354
Log:
Adding a quick check that some particles of the specified type DO exist in the
nparticles callback
Modified:
branches/yt-1.5/yt/raven/Callbacks.py
trunk/yt/raven/Callbacks.py
Modified: branches/yt-1.5/yt/raven/Callbacks.py
==============================================================================
--- branches/yt-1.5/yt/raven/Callbacks.py (original)
+++ branches/yt-1.5/yt/raven/Callbacks.py Tue Jun 23 11:24:21 2009
@@ -842,6 +842,7 @@
print gg, reg[field_x][gg].size
if self.ptype is not None:
gg &= (reg["particle_type"] == self.ptype)
+ if gg.sum() == 0: return
plot._axes.hold(True)
px, py = self.convert_to_pixels(plot,
[reg[field_x][gg][::self.stride],
Modified: trunk/yt/raven/Callbacks.py
==============================================================================
--- trunk/yt/raven/Callbacks.py (original)
+++ trunk/yt/raven/Callbacks.py Tue Jun 23 11:24:21 2009
@@ -842,6 +842,7 @@
print gg, reg[field_x][gg].size
if self.ptype is not None:
gg &= (reg["particle_type"] == self.ptype)
+ if gg.sum() == 0: return
plot._axes.hold(True)
px, py = self.convert_to_pixels(plot,
[reg[field_x][gg][::self.stride],
More information about the yt-svn
mailing list