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

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Wed May 28 09:28:40 PDT 2008


Author: mturk
Date: Wed May 28 09:28:39 2008
New Revision: 496
URL: http://yt.spacepope.org/changeset/496

Log:
Optionally add an id to the phase plot object.



Modified:
   trunk/yt/raven/PlotCollection.py

Modified: trunk/yt/raven/PlotCollection.py
==============================================================================
--- trunk/yt/raven/PlotCollection.py	(original)
+++ trunk/yt/raven/PlotCollection.py	Wed May 28 09:28:39 2008
@@ -150,7 +150,7 @@
                                weight="CellMassMsun", accumulation=False,
                                x_bins=64, x_log=True, x_bounds=None,
                                y_bins=64, y_log=True, y_bounds=None,
-                               lazy_reader=False):
+                               lazy_reader=False, id=None):
         if x_bounds is None:
             x_min, x_max = object[fields[0]].min(), object[fields[0]].max()
         else:
@@ -168,9 +168,9 @@
         # These next two lines are painful.
         profile.pf = self.pf
         profile.hierarchy = self.pf.hierarchy
+        if id is None: id = self._get_new_id()
         p = self._add_plot(PlotTypes.NewPhasePlot(profile, fields, 
-                                                  self._get_new_id(),
-                                                  cmap=cmap))
+                                                  id, cmap=cmap))
         return p
 
     def _get_new_id(self):



More information about the yt-svn mailing list