[Yt-svn] yt-commit r656 - trunk/examples
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Tue Jul 8 10:33:32 PDT 2008
Author: mturk
Date: Tue Jul 8 10:33:31 2008
New Revision: 656
URL: http://yt.spacepope.org/changeset/656
Log:
Added a byline for Britton, fixed the way the Clump.py classes and functions
are referenced.
Modified:
trunk/examples/find_clumps_dataset.py
Modified: trunk/examples/find_clumps_dataset.py
==============================================================================
--- trunk/examples/find_clumps_dataset.py (original)
+++ trunk/examples/find_clumps_dataset.py Tue Jul 8 10:33:31 2008
@@ -5,9 +5,10 @@
# field: data field over which contours are made (example: "Density" or "AveragedDensity").
# step: contouring stepsize. The field minimum is multiplied by this value each round of
# the clump finding.
+# Written by Britton Smith
import sys, time
-import Clump as cl
+from yt.mods import *
from math import *
def find_clumps_dataset(prefix,data_object,field,step):
@@ -16,18 +17,18 @@
c_min = 10**floor(log10(data_object[field].min()))
c_max = 10**floor(log10(data_object[field].max())+1)
- master_clump = cl.Clump(data_object, None, field)
- cl.find_clumps(master_clump, c_min, c_max, step)
+ master_clump = Clump(data_object, None, field)
+ find_clumps(master_clump, c_min, c_max, step)
t2=time.time()
print "Took %0.3e seconds" % (t2-t1)
f = open('%s_clump_hierarchy.txt' % prefix,'w')
- cl.write_clump_hierarchy(master_clump,0,f)
+ write_clump_hierarchy(master_clump,0,f)
f.close()
f = open('%s_clumps.txt' % prefix,'w')
- cl.write_clumps(master_clump,0,f)
+ write_clumps(master_clump,0,f)
f.close()
return master_clump
More information about the yt-svn
mailing list