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

skillman at wrangler.dreamhost.com skillman at wrangler.dreamhost.com
Tue Jun 16 08:28:01 PDT 2009


Author: skillman
Date: Tue Jun 16 08:28:00 2009
New Revision: 1334
URL: http://yt.spacepope.org/changeset/1334

Log:
Updating HaloProfiler to output h5 file with node names that have field_weightfield syntax.


Modified:
   trunk/yt/extensions/HaloProfiler.py

Modified: trunk/yt/extensions/HaloProfiler.py
==============================================================================
--- trunk/yt/extensions/HaloProfiler.py	(original)
+++ trunk/yt/extensions/HaloProfiler.py	Tue Jun 16 08:28:00 2009
@@ -153,7 +153,7 @@
 
                 profile = lagos.BinnedProfile1D(sphere,self.haloProfilerParameters['n_bins'],"RadiusMpc",
                                                 r_min,halo['r_max'],
-                                                log_space=True, lazy_reader=False)
+                                                log_space=True, lazy_reader=True)
                 for field in self.profileFields.keys():
                     profile.add_fields(field,weight=self.profileFields[field][0],
                                        accumulation=self.profileFields[field][1])
@@ -281,7 +281,7 @@
                         frb = raven.FixedResolutionBuffer(pc.plots[e].data,(proj_left[0],proj_right[0],proj_left[1],proj_right[1]),
                                                           (projectionResolution,projectionResolution),
                                                           antialias=False)
-                        output.create_dataset("/%s" % field,data=frb[field])
+                        output.create_dataset("/%s_%s" % (field,self.projectionFields[field]),data=frb[field])
                     output.close()
 
                 if save_images:
@@ -314,7 +314,7 @@
 
         rho_crit_now = 1.8788e-29 * self.pf['CosmologyHubbleConstantNow']**2.0 # g cm^-3
         Msun2g = 1.989e33
-        rho_crit = rho_crit_now * ((1 + self.pf['CosmologyCurrentRedshift'])**3.0)
+        rho_crit = rho_crit_now * ((1.0 + self.pf['CosmologyCurrentRedshift'])**3.0)
 
         profile['ActualOverdensity'] = (Msun2g * profile['TotalMassMsun']) / \
             profile['CellVolume'] / rho_crit



More information about the yt-svn mailing list