[Yt-svn] yt-commit r1392 - trunk/yt/extensions

britton at wrangler.dreamhost.com britton at wrangler.dreamhost.com
Fri Jul 31 11:12:35 PDT 2009


Author: britton
Date: Fri Jul 31 11:12:35 2009
New Revision: 1392
URL: http://yt.spacepope.org/changeset/1392

Log:
Added keyword arg, enzo_parameters, to EnzoSimulation instantiation, allowing 
one to specify additional parameters to be pulled from the simulation 
parameter file.  Like EnzoParameterDict inside EnzoSimulation.py, 
enzo_parameters is a dictionary where the entries are the parameters and the 
values are the type to which they are to be converted (float, int, etc.).


Modified:
   trunk/yt/extensions/EnzoSimulation.py

Modified: trunk/yt/extensions/EnzoSimulation.py
==============================================================================
--- trunk/yt/extensions/EnzoSimulation.py	(original)
+++ trunk/yt/extensions/EnzoSimulation.py	Fri Jul 31 11:12:35 2009
@@ -10,7 +10,7 @@
     a simulation from one redshift to another.
     """
     def __init__(self,EnzoParameterFile,initial_time=None,final_time=None,initial_redshift=None,final_redshift=None,
-                 links=False):
+                 links=False,enzo_parameters={}):
         self.EnzoParameterFile = EnzoParameterFile
         self.enzoParameters = {}
         self.redshiftOutputs = []
@@ -22,6 +22,9 @@
         self.FinalRedshift = final_redshift
         self.links = links
 
+        # Add any extra parameters to parameter dict.
+        EnzoParameterDict.update(enzo_parameters)
+
         # Set some parameter defaults.
         self._SetParameterDefaults()
 



More information about the yt-svn mailing list