[Yt-svn] yt-commit r1199 - trunk/yt/raven
sskory at wrangler.dreamhost.com
sskory at wrangler.dreamhost.com
Wed Mar 4 09:00:50 PST 2009
Author: sskory
Date: Wed Mar 4 09:00:49 2009
New Revision: 1199
URL: http://yt.spacepope.org/changeset/1199
Log:
added max halo particle count to HopCircleCallback
Modified:
trunk/yt/raven/Callbacks.py
Modified: trunk/yt/raven/Callbacks.py
==============================================================================
--- trunk/yt/raven/Callbacks.py (original)
+++ trunk/yt/raven/Callbacks.py Wed Mar 4 09:00:49 2009
@@ -555,13 +555,15 @@
class HopCircleCallback(PlotCallback):
def __init__(self, hop_output, axis, max_number=None,
- annotate=False, min_size=20, font_size=8, print_halo_size=False,
+ annotate=False, min_size=20, max_size=10000000,
+ font_size=8, print_halo_size=False,
print_halo_mass=False):
self.axis = axis
self.hop_output = hop_output
self.max_number = max_number
self.annotate = annotate
self.min_size = min_size
+ self.max_size = max_size
self.font_size = font_size
self.print_halo_size = print_halo_size
self.print_halo_mass = print_halo_mass
@@ -577,7 +579,7 @@
dy = plot.image._A.shape[1] / (y1-y0)
for halo in self.hop_output[:self.max_number]:
size = halo.get_size()
- if size < self.min_size: continue
+ if size < self.min_size or size > self.max_size: continue
radius = halo.maximum_radius() * dx
center = halo.center_of_mass()
center_x = (center[xi] - x0)*dx
More information about the yt-svn
mailing list