[Yt-svn] yt-commit r872 - trunk/yt/lagos/lightcone

britton at wrangler.dreamhost.com britton at wrangler.dreamhost.com
Tue Nov 4 09:35:49 PST 2008


Author: britton
Date: Tue Nov  4 09:35:48 2008
New Revision: 872
URL: http://yt.spacepope.org/changeset/872

Log:
Added **kwargs to end of projection arg list so general keywords can be 
passed to projection routines.

4 November, 2008

Britton Smith



Modified:
   trunk/yt/lagos/lightcone/LightCone.py
   trunk/yt/lagos/lightcone/LightConeProjection.py

Modified: trunk/yt/lagos/lightcone/LightCone.py
==============================================================================
--- trunk/yt/lagos/lightcone/LightCone.py	(original)
+++ trunk/yt/lagos/lightcone/LightCone.py	Tue Nov  4 09:35:48 2008
@@ -155,7 +155,7 @@
         del self.timeOutputs
         del co
 
-    def ProjectLightCone(self,field,weight_field=None):
+    def ProjectLightCone(self,field,weight_field=None,**kwargs):
         "Create projections for light cone, then add them together."
 
         if not(self.lightConeParameters['OutputDir'].endswith("/")):
@@ -169,7 +169,8 @@
                                        q,len(self.lightConeSolution))
             output['object'] = EnzoStaticOutput(output['filename'])
             frb = LightConeProjection(output,field,pixels,weight_field=weight_field,
-                                      save_image=self.lightConeParameters['SaveLightConeSlices'],name=name)
+                                      save_image=self.lightConeParameters['SaveLightConeSlices'],
+                                      name=name,**kwargs)
             if (weight_field is not None):
                 # Data come back normalized by the weight field.
                 # Undo that so it can be added up for the light cone.

Modified: trunk/yt/lagos/lightcone/LightConeProjection.py
==============================================================================
--- trunk/yt/lagos/lightcone/LightConeProjection.py	(original)
+++ trunk/yt/lagos/lightcone/LightConeProjection.py	Tue Nov  4 09:35:48 2008
@@ -25,7 +25,7 @@
 
 from yt.lagos.lightcone import *
 
-def LightConeProjection(lightConeSlice,field,pixels,weight_field=None,save_image=False,name=""):
+def LightConeProjection(lightConeSlice,field,pixels,weight_field=None,save_image=False,name="",**kwargs):
     "Create a single projection to be added into the light cone stack."
 
     # Use some projection parameters to seed random number generator to make unique node name.
@@ -65,7 +65,7 @@
 
     # Make projection.
     pc.add_projection(field,lightConeSlice['ProjectionAxis'],weight_field=weight_field,source=periodic_region,use_colorbar=True,
-                      node_name=node_name)
+                      node_name=node_name,**kwargs)
 
     # Serialize projection data.
     pc.plots[0].data._serialize(node_name,force=True)



More information about the yt-svn mailing list