[Yt-svn] yt-commit r848 - trunk/examples
britton at wrangler.dreamhost.com
britton at wrangler.dreamhost.com
Sun Oct 26 11:18:19 PDT 2008
Author: britton
Date: Sun Oct 26 11:18:19 2008
New Revision: 848
URL: http://yt.spacepope.org/changeset/848
Log:
Add example of making a light cone projection.
24 October, 2008
Britton Smith
Added:
trunk/examples/makeLightCone.py
Added: trunk/examples/makeLightCone.py
==============================================================================
--- (empty file)
+++ trunk/examples/makeLightCone.py Sun Oct 26 11:18:19 2008
@@ -0,0 +1,23 @@
+"""
+Light cone example.
+"""
+
+from yt.lagos.lightcone import *
+
+q = LightCone("128Mpc256grid_SFFB.param","lightcone.par")
+
+q.CalculateLightConeSolution()
+
+# Save a text file detailing the light cone solution.
+q.SaveLightConeSolution()
+
+# Make a density light cone.
+# The plot collection is returned so the final image can be
+# customized and remade.
+pc = q.ProjectLightCone('Density')
+
+# Make a weighted light cone projection.
+pc = q.ProjectLightCone('Temperature',weight_field='Density')
+
+# Save the light cone stack to an hdf5 file.
+q.SaveLightConeStack()
More information about the yt-svn
mailing list