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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Jun 20 09:02:54 PDT 2014


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/f0dac87439bb/
Changeset:   f0dac87439bb
Branch:      yt-3.0
User:        MatthewTurk
Date:        2014-06-20 04:56:43
Summary:     Fixing center setting.

For x and z plots, this is not a huge deal.  And, for symmetric domains, same.
But in some situations we need to ensure we are in the correct situation for
developing the centers.  This may be wrong, but it's a start!
Affected #:  1 file

diff -r 3c1a3d3de75acd092950c66c4915be4b6dce4bef -r f0dac87439bb379b7d86f7334a51535b4762c9b9 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -296,9 +296,8 @@
         self._set_window(bounds) # this automatically updates the data and plot
         self.origin = origin
         if self.data_source.center is not None and oblique == False:
-            center = [self.data_source.center[i] for i in
-                      range(len(self.data_source.center))
-                      if i != self.data_source.axis]
+            center = [(self.bounds[1] + self.bounds[0])/2.0,
+                      (self.bounds[3] + self.bounds[2])/2.0]
             self.set_center(center)
         for field in self.data_source._determine_fields(self.frb.data.keys()):
             finfo = self.data_source.pf._get_field_info(*field)


https://bitbucket.org/yt_analysis/yt/commits/7d2bf07d5de1/
Changeset:   7d2bf07d5de1
Branch:      yt-3.0
User:        MatthewTurk
Date:        2014-06-20 14:46:22
Summary:     We should set the center like this instead.
Affected #:  1 file

diff -r f0dac87439bb379b7d86f7334a51535b4762c9b9 -r 7d2bf07d5de1c71380f61b0c4310f1b002b569b9 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -296,8 +296,11 @@
         self._set_window(bounds) # this automatically updates the data and plot
         self.origin = origin
         if self.data_source.center is not None and oblique == False:
-            center = [(self.bounds[1] + self.bounds[0])/2.0,
-                      (self.bounds[3] + self.bounds[2])/2.0]
+            ax = self.data_source.axis
+            xax = self.pf.coordinates.x_axis[ax]
+            yax = self.pf.coordinates.y_axis[ax]
+            center = [self.data_source.center[xax],
+                      self.data_source.center[yax]]
             self.set_center(center)
         for field in self.data_source._determine_fields(self.frb.data.keys()):
             finfo = self.data_source.pf._get_field_info(*field)

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