[Yt-svn] yt: 2 new changesets

hg at spacepope.org hg at spacepope.org
Tue May 4 07:52:00 PDT 2010


hg Repository: yt
details:   yt/rev/b996fd53e219
changeset: 1638:b996fd53e219
user:      Matthew Turk <matthewturk at gmail.com>
date:
Tue May 04 07:51:25 2010 -0700
description:
Changing structure function import problem notification, dropping colormap to
'debug' notification level.

hg Repository: yt
details:   yt/rev/0f1c190e5e47
changeset: 1639:0f1c190e5e47
user:      Matthew Turk <matthewturk at gmail.com>
date:
Tue May 04 07:51:43 2010 -0700
description:
Merging

diffstat:

 yt/extensions/MergerTree.py            |  2 +-
 yt/lagos/StructureFunctionGenerator.py |  6 +++++-
 yt/raven/__init__.py                   |  2 +-
 3 files changed, 7 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r 56c6eb13a002 -r 0f1c190e5e47 yt/extensions/MergerTree.py
--- a/yt/extensions/MergerTree.py	Fri Apr 30 15:09:26 2010 -0700
+++ b/yt/extensions/MergerTree.py	Tue May 04 07:51:43 2010 -0700
@@ -791,7 +791,7 @@
             self.cursor.execute(line, value)
             result = self.cursor.fetchone()
             self.nodes[halo] = Node(na.array([result[2],result[3],result[4]]),
-                result[1], [], result[0], 1. - float(result[5])/maxID)
+                result[1], [], result[0], 1. - float(result[5])/(maxID+1)) #+1 to prevent /0
             self.levels[result[0]].append(halo)
 
     def _open_dot(self, dotfile):
diff -r 56c6eb13a002 -r 0f1c190e5e47 yt/lagos/StructureFunctionGenerator.py
--- a/yt/lagos/StructureFunctionGenerator.py	Fri Apr 30 15:09:26 2010 -0700
+++ b/yt/lagos/StructureFunctionGenerator.py	Tue May 04 07:51:43 2010 -0700
@@ -29,7 +29,7 @@
 try:
     from yt.extensions.kdtree import *
 except ImportError:
-    mylog.info("The Fortran kD-Tree did not import correctly. The structure function generator will not work correctly.")
+    mylog.debug("The Fortran kD-Tree did not import correctly. The structure function generator will not work correctly.")
 
 import math, sys, itertools, inspect, types, time
 from collections import defaultdict
@@ -63,6 +63,10 @@
         number of ruler lengths, ruler min/max, number of structure functions,
         number of point pairs per ruler length). Default: 0.
         """
+        try:
+            fKD
+        except NameError:
+            raise ImportError("You need to install the Forthon kD-Tree")
         self._fsets = []
         self.fields = fields
         # MPI stuff.
diff -r 56c6eb13a002 -r 0f1c190e5e47 yt/raven/__init__.py
--- a/yt/raven/__init__.py	Fri Apr 30 15:09:26 2010 -0700
+++ b/yt/raven/__init__.py	Tue May 04 07:51:43 2010 -0700
@@ -68,7 +68,7 @@
     color_maps = matplotlib.cm._cmapnames + raven_colormaps.keys()
 default_cmap = ytcfg.get("raven", "colormap")
 if default_cmap != "jet":
-    mylog.info("Setting default colormap to %s", default_cmap)
+    mylog.debug("Setting default colormap to %s", default_cmap)
     matplotlib.rc('image', cmap=default_cmap)
 
 from PlotCollection import *



More information about the yt-svn mailing list