[Yt-svn] yt-commit r537 - trunk/yt/raven
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Wed Jun 4 18:26:01 PDT 2008
Author: mturk
Date: Wed Jun 4 18:26:00 2008
New Revision: 537
URL: http://yt.spacepope.org/changeset/537
Log:
Another couple changes. Now, while you ''can'' interact with the object, you
can also provide a pre_call:
my_vrc.run(pre_call=lambda a: a.add_isosurfaces(3, amin=0.1, amax=0.15))
for instance. Or, more complicated things I haven't thought of.
Modified:
trunk/yt/raven/Plot3DInterface.py
Modified: trunk/yt/raven/Plot3DInterface.py
==============================================================================
--- trunk/yt/raven/Plot3DInterface.py (original)
+++ trunk/yt/raven/Plot3DInterface.py Wed Jun 4 18:26:00 2008
@@ -85,7 +85,7 @@
if vals is None:
if log_space: func=na.logspace
else: func=na.linspace
- vals = func(self._dmin, self._dmax, number)
+ vals = func(self._dmin, self._dmax, number+2)[1:-1]
if log_space: vals = na.log10(vals)
for val,a in zip(vals, na.linspace(amin, amax, number)):
self.isoids.append(
@@ -101,10 +101,11 @@
0, nx, 0, nx, 0, nx, self.tr, val,
1, 't', alpha, r,g,b)
- def run(self):
+ def run(self, pre_call=None):
self.__setup_s2plot()
self.__setup_volrendering()
self.__register_callbacks()
+ if pre_call is not None: pre_call(self)
self.__start_rendering()
def restart(self):
More information about the yt-svn
mailing list