[Yt-svn] commit/yt: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Tue Oct 4 13:08:31 PDT 2011


2 new changesets in yt:

http://bitbucket.org/yt_analysis/yt/changeset/01aac98d6c85/
changeset:   01aac98d6c85
branch:      yt
user:        chummels
date:        2011-10-04 22:07:35
summary:     Adding test command line parameter, as part of my attempt to debug the yt update command.
affected #:  1 file (-1 bytes)

--- a/yt/utilities/command_line.py	Mon Oct 03 12:39:37 2011 -0400
+++ b/yt/utilities/command_line.py	Tue Oct 04 16:07:35 2011 -0400
@@ -716,6 +716,12 @@
                  encoding=opts.encoding, open_browser=opts.open_browser,
                  private=opts.private, clipboard=opts.clipboard)
 
+    def do_test(self, subcmd, opts):
+        """
+        Testing
+        """
+        print "Testing"
+
     def do_pastebin_grab(self, subcmd, opts, arg):
         """
         Print an online pastebin to STDOUT for local use. Paste ID is 


http://bitbucket.org/yt_analysis/yt/changeset/a0fb2cac2c47/
changeset:   a0fb2cac2c47
branch:      yt
user:        chummels
date:        2011-10-04 22:08:22
summary:     Merging.
affected #:  2 files (-1 bytes)

--- a/yt/utilities/amr_kdtree/amr_kdtree.py	Tue Oct 04 16:07:35 2011 -0400
+++ b/yt/utilities/amr_kdtree/amr_kdtree.py	Tue Oct 04 16:08:22 2011 -0400
@@ -755,7 +755,7 @@
         for i in range(2**nprocs):
             if ((i + 1)>>par_tree_depth) == 1:
                 # There are nprocs nodes that meet this criteria
-                if (i+1-nprocs) is not my_rank:
+                if (i+1-nprocs) != my_rank:
                     self.tree_dict.pop(i)
                     continue
         for node in self.tree_dict.itervalues():
@@ -1002,7 +1002,7 @@
             # This is where all the domain decomposition occurs.  
             if ((current_node.id + 1)>>par_tree_depth) == 1:
                 # There are anprocs nodes that meet this criteria
-                if (current_node.id+1-anprocs) is my_rank:
+                if (current_node.id+1-anprocs) == my_rank:
                     # I own this shared node
                     self.my_l_corner = current_node.l_corner
                     self.my_r_corner = current_node.r_corner
@@ -1012,7 +1012,7 @@
                     continue
                 
             # If we are down to one grid, we are either in it or the parent grid
-            if len(current_node.grids) is 1:
+            if len(current_node.grids) == 1:
                 thisgrid = current_node.grids[0]
                 # If we are completely contained by that grid
                 if (thisgrid.LeftEdge[0] <= current_node.l_corner[0]) and (thisgrid.RightEdge[0] >= current_node.r_corner[0]) and \
@@ -1040,7 +1040,7 @@
                     continue
 
             # If we don't have any grids, this volume belongs to the parent        
-            if len(current_node.grids) is 0:
+            if len(current_node.grids) == 0:
                 set_leaf(current_node, current_node.parent_grid, current_node.l_corner, current_node.r_corner)
                 # print 'This volume does not have a child grid, so it belongs to my parent!'
                 current_node, previous_node = self.step_depth(current_node, previous_node)


--- a/yt/visualization/plot_modifications.py	Tue Oct 04 16:07:35 2011 -0400
+++ b/yt/visualization/plot_modifications.py	Tue Oct 04 16:08:22 2011 -0400
@@ -918,16 +918,18 @@
         self.text_args = text_args
 
     def __call__(self, plot):
-        if self.data_coords:
+        kwargs = self.text_args.copy()
+        if self.data_coords and len(plot.image._A.shape) == 2:
             if len(self.pos) == 3:
                 pos = (self.pos[x_dict[plot.data.axis]],
                        self.pos[y_dict[plot.data.axis]])
             else: pos = self.pos
             x,y = self.convert_to_pixels(plot, pos)
         else:
-            x = plot.image._A.shape[0] * self.pos[0]
-            y = plot.image._A.shape[1] * self.pos[1]
-        plot._axes.text(x, y, self.text, **self.text_args)
+            x, y = self.pos
+            if not self.data_coords:
+                kwargs["transform"] = plot._axes.transAxes
+        plot._axes.text(x, y, self.text, **kwargs)
 
 class ParticleCallback(PlotCallback):
     _type_name = "particles"

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list