[Yt-svn] yt-commit r910 - trunk/examples

britton at wrangler.dreamhost.com britton at wrangler.dreamhost.com
Mon Nov 10 11:06:09 PST 2008


Author: britton
Date: Mon Nov 10 11:06:08 2008
New Revision: 910
URL: http://yt.spacepope.org/changeset/910

Log:
Added examples of how to create a recycled light cone solution.



Modified:
   trunk/examples/makeLightCone.py

Modified: trunk/examples/makeLightCone.py
==============================================================================
--- trunk/examples/makeLightCone.py	(original)
+++ trunk/examples/makeLightCone.py	Mon Nov 10 11:06:08 2008
@@ -16,8 +16,27 @@
 # customized and remade.
 pc = q.ProjectLightCone('Density')
 
+# Save the light cone stack to an hdf5 file.
+q.SaveLightConeStack()
+
 # Make a weighted light cone projection.
 pc = q.ProjectLightCone('Temperature',weight_field='Density')
 
-# Save the light cone stack to an hdf5 file.
-q.SaveLightConeStack()
+# Save the temperature stack to a different file.
+q.SaveLightConeStack(file='light_cone_temperature.h5')
+
+# Recycle current light cone solution by creating a new solution 
+# that only randomizes the lateral shifts.
+# This will allow the projection objects that have already been made 
+# to be re-used.
+# Just don't use the same random seed as the original.
+q.RecycleLightConeSolution(987654321)
+
+# Save the recycled solution.
+q.SaveLightConeSolution(file='light_cone_recycled.out')
+
+# Make new projection with the recycled solution.
+pc = q.ProjectLightCone('Density')
+
+# Save the stack.
+q.SaveLightConeStack(file='light_cone_recycled.h5')



More information about the yt-svn mailing list