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

sskory at wrangler.dreamhost.com sskory at wrangler.dreamhost.com
Fri Jan 22 18:22:27 PST 2010


Author: sskory
Date: Fri Jan 22 18:22:26 2010
New Revision: 1592
URL: http://yt.enzotools.org/changeset/1592

Log:
Making such that users can specify the range of halo masses if they choose in the halo mass function.

Modified:
   trunk/yt/extensions/HaloMassFcn.py

Modified: trunk/yt/extensions/HaloMassFcn.py
==============================================================================
--- trunk/yt/extensions/HaloMassFcn.py	(original)
+++ trunk/yt/extensions/HaloMassFcn.py	Fri Jan 22 18:22:26 2010
@@ -101,8 +101,10 @@
             self.hubble0 = self.pf['CosmologyHubbleConstantNow']
             self.this_redshift = self.pf['CosmologyCurrentRedshift']
             self.read_haloes()
-            self.log_mass_min = math.log10(min(self.haloes))
-            self.log_mass_max = math.log10(max(self.haloes))
+            if self.log_mass_min == None:
+                self.log_mass_min = math.log10(min(self.haloes))
+            if self.log_mass_max == None:
+                self.log_mass_max = math.log10(max(self.haloes))
 
         # Input error check.
         if self.mode == 'single':



More information about the yt-svn mailing list