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

sskory at wrangler.dreamhost.com sskory at wrangler.dreamhost.com
Tue Feb 23 10:41:00 PST 2010


Author: sskory
Date: Tue Feb 23 10:40:59 2010
New Revision: 1639
URL: http://yt.enzotools.org/changeset/1639

Log:
Return no halos if there the halo file is empty.

Modified:
   trunk/yt/extensions/HaloMassFcn.py

Modified: trunk/yt/extensions/HaloMassFcn.py
==============================================================================
--- trunk/yt/extensions/HaloMassFcn.py	(original)
+++ trunk/yt/extensions/HaloMassFcn.py	Tue Feb 23 10:40:59 2010
@@ -179,6 +179,9 @@
         mylog.info("Reading halo masses from %s" % self.halo_file)
         f = open(self.halo_file,'r')
         line = f.readline()
+        if line == "":
+            self.haloes = na.array([])
+            return
         while line[0] == '#':
             line = f.readline()
         self.haloes = []



More information about the yt-svn mailing list