[Yt-svn] yt-commit r441 - in trunk/yt: . lagos

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Wed May 7 13:23:54 PDT 2008


Author: mturk
Date: Wed May  7 13:23:52 2008
New Revision: 441
URL: http://yt.spacepope.org/changeset/441

Log:
Against my best judgment, I have added a new parameter for a THIRD invention of
physical units implementation.

Incidentally, I am growing weary of indpendent, incompatible implementations of
obvious routines.



Modified:
   trunk/yt/config.py
   trunk/yt/lagos/OutputTypes.py

Modified: trunk/yt/config.py
==============================================================================
--- trunk/yt/config.py	(original)
+++ trunk/yt/config.py	Wed May  7 13:23:52 2008
@@ -55,6 +55,7 @@
         'useswig' : 'False',
         'loadfieldplugins':'False',
         'pluginfilename':'yt_plugins.py',
+        'nounitslength':'1.0',
         },
     "yt":{
         'LogFile': 'False',

Modified: trunk/yt/lagos/OutputTypes.py
==============================================================================
--- trunk/yt/lagos/OutputTypes.py	(original)
+++ trunk/yt/lagos/OutputTypes.py	Wed May  7 13:23:52 2008
@@ -206,9 +206,9 @@
 
     def _setup_nounits_units(self):
         z = 0
-        box_proper = 1.0
+        box_proper = ytcfg.getfloat("lagos","nounitslength")
         self.units['aye'] = 1.0
-        mylog.warning("No length units.  Setting 1.0 = 1 proper Mpc.")
+        mylog.warning("No length units.  Setting 1.0 = %0.3e proper Mpc.", box_proper)
         if not self.has_key("TimeUnits"):
             mylog.warning("No time units.  Setting 1.0 = 1 second.")
             self.conversion_factors["Time"] = 1.0



More information about the yt-svn mailing list