[Yt-svn] yt-commit r1221 - trunk/yt/extensions
britton at wrangler.dreamhost.com
britton at wrangler.dreamhost.com
Thu Mar 19 15:31:25 PDT 2009
Author: britton
Date: Thu Mar 19 15:31:25 2009
New Revision: 1221
URL: http://yt.spacepope.org/changeset/1221
Log:
Fixed bug in checking for fields in profile. Also, added factor of h^2 in
front of ActualOverdensity field.
Modified:
trunk/yt/extensions/HaloProfiler.py
Modified: trunk/yt/extensions/HaloProfiler.py
==============================================================================
--- trunk/yt/extensions/HaloProfiler.py (original)
+++ trunk/yt/extensions/HaloProfiler.py Thu Mar 19 15:31:25 2009
@@ -311,10 +311,10 @@
def _AddActualOverdensity(self,profile):
"Calculate overdensity from TotalMassMsun and CellVolume fields."
- if profile.has_key('ActualOverdensity'):
+ if (profile.keys()).count('ActualOverdensity') > 0:
return
- rho_crit_now = 1.8788e-29 * pf['CosmologyHubbleConstantNow']**2.0 # g cm^-3
+ 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)
More information about the yt-svn
mailing list