[Yt-svn] yt-commit r1683 - in trunk/yt: lagos raven

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Thu Apr 8 14:30:07 PDT 2010


Author: mturk
Date: Thu Apr  8 14:30:05 2010
New Revision: 1683
URL: http://yt.enzotools.org/changeset/1683

Log:
Adding 'c' as an option to the instantiation of a PlotCollection.  Fixing
Total_Energy to be displayed correctly.



Modified:
   trunk/yt/lagos/EnzoFields.py
   trunk/yt/raven/PlotCollection.py

Modified: trunk/yt/lagos/EnzoFields.py
==============================================================================
--- trunk/yt/lagos/EnzoFields.py	(original)
+++ trunk/yt/lagos/EnzoFields.py	Thu Apr  8 14:30:05 2010
@@ -138,11 +138,13 @@
 def _TotalEnergy(field, data):
     return data["Total_Energy"] / _convertEnergy(data)
 add_field("TotalEnergy", function=_TotalEnergy,
+          display_name = "\mathrm{Total}\/\mathrm{Energy}",
           units=r"\rm{ergs}/\rm{g}", convert_function=_convertEnergy)
 
 def _Total_Energy(field, data):
     return data["TotalEnergy"] / _convertEnergy(data)
 add_field("Total_Energy", function=_Total_Energy,
+          display_name = "\mathrm{Total}\/\mathrm{Energy}",
           units=r"\rm{ergs}/\rm{g}", convert_function=_convertEnergy)
 
 def _NumberDensity(field, data):

Modified: trunk/yt/raven/PlotCollection.py
==============================================================================
--- trunk/yt/raven/PlotCollection.py	(original)
+++ trunk/yt/raven/PlotCollection.py	Thu Apr  8 14:30:05 2010
@@ -49,6 +49,8 @@
         self.pf = pf
         if center == None:
             v,self.c = pf.h.find_max("Density") # @todo: ensure no caching
+        elif center == "center" or center == "c":
+            self.c = (pf["DomainRightEdge"] + pf["DomainLeftEdge"])/2.0
         else:
             self.c = na.array(center, dtype='float64')
         if deliverator_id > 0:



More information about the yt-svn mailing list