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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Oct 3 08:17:11 PDT 2014


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/d3bfe9303187/
Changeset:   d3bfe9303187
Branch:      yt
User:        ngoldbaum
Date:        2014-10-02 20:11:30+00:00
Summary:     Need to simplify the result of a division of two YTArrays.  Closes #915.
Affected #:  2 files

diff -r c0d6e31c64f3cd8029b911c36d2d08185434f713 -r d3bfe93031870cc385d42924e03e3cbe82acdcca yt/visualization/base_plot_types.py
--- a/yt/visualization/base_plot_types.py
+++ b/yt/visualization/base_plot_types.py
@@ -121,8 +121,8 @@
                 bmap = brewer2mpl.get_map(*cmap)
                 cmap = bmap.get_mpl_colormap(N=cmap[2])
             else:
-                raise RuntimeError("Please install brewer2mpl to use colorbrewer colormaps")
-
+                raise RuntimeError(
+                    "Please install brewer2mpl to use colorbrewer colormaps")
         self.image = self.axes.imshow(data.to_ndarray(), origin='lower',
                                       extent=extent, norm=norm, vmin=self.zmin,
                                       aspect=aspect, vmax=self.zmax, cmap=cmap)

diff -r c0d6e31c64f3cd8029b911c36d2d08185434f713 -r d3bfe93031870cc385d42924e03e3cbe82acdcca yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -697,8 +697,8 @@
             # This will likely be replaced at some point by the coordinate handler
             # setting plot aspect.
             if self.aspect is None:
-                self.aspect = np.float64(self.ds.quan(1.0, unit_y) /
-                                         self.ds.quan(1.0, unit_x))
+                self.aspect = np.float64((self.ds.quan(1.0, unit_y) /
+                                         self.ds.quan(1.0, unit_x)).in_cgs())
 
             extentx = [(self.xlim[i] - xc).in_units(unit_x) for i in (0, 1)]
             extenty = [(self.ylim[i] - yc).in_units(unit_y) for i in (0, 1)]
@@ -1661,7 +1661,7 @@
         self._cb_size = 0.0375*fsize
         self._ax_text_size = [1.2*fontscale, 0.9*fontscale]
         self._top_buff_size = 0.30*fontscale
-        self._aspect = ((extent[1] - extent[0])/(extent[3] - extent[2]))
+        self._aspect = ((extent[1] - extent[0])/(extent[3] - extent[2])).in_cgs()
 
         size, axrect, caxrect = self._get_best_layout()
 


https://bitbucket.org/yt_analysis/yt/commits/c248e755d7c8/
Changeset:   c248e755d7c8
Branch:      yt
User:        xarthisius
Date:        2014-10-03 15:17:00+00:00
Summary:     Merged in ngoldbaum/yt (pull request #1234)

[BUGFIX] Need to simplify the result of a division of two YTArrays.  Closes #915.
Affected #:  2 files

diff -r 7c8d9bdb02de4a2a356796b325aaac80f12f4cdc -r c248e755d7c8497f88f2e8d0d3f21e4fc28a2208 yt/visualization/base_plot_types.py
--- a/yt/visualization/base_plot_types.py
+++ b/yt/visualization/base_plot_types.py
@@ -121,8 +121,8 @@
                 bmap = brewer2mpl.get_map(*cmap)
                 cmap = bmap.get_mpl_colormap(N=cmap[2])
             else:
-                raise RuntimeError("Please install brewer2mpl to use colorbrewer colormaps")
-
+                raise RuntimeError(
+                    "Please install brewer2mpl to use colorbrewer colormaps")
         self.image = self.axes.imshow(data.to_ndarray(), origin='lower',
                                       extent=extent, norm=norm, vmin=self.zmin,
                                       aspect=aspect, vmax=self.zmax, cmap=cmap)

diff -r 7c8d9bdb02de4a2a356796b325aaac80f12f4cdc -r c248e755d7c8497f88f2e8d0d3f21e4fc28a2208 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -697,8 +697,8 @@
             # This will likely be replaced at some point by the coordinate handler
             # setting plot aspect.
             if self.aspect is None:
-                self.aspect = np.float64(self.ds.quan(1.0, unit_y) /
-                                         self.ds.quan(1.0, unit_x))
+                self.aspect = np.float64((self.ds.quan(1.0, unit_y) /
+                                         self.ds.quan(1.0, unit_x)).in_cgs())
 
             extentx = [(self.xlim[i] - xc).in_units(unit_x) for i in (0, 1)]
             extenty = [(self.ylim[i] - yc).in_units(unit_y) for i in (0, 1)]
@@ -1661,7 +1661,7 @@
         self._cb_size = 0.0375*fsize
         self._ax_text_size = [1.2*fontscale, 0.9*fontscale]
         self._top_buff_size = 0.30*fontscale
-        self._aspect = ((extent[1] - extent[0])/(extent[3] - extent[2]))
+        self._aspect = ((extent[1] - extent[0])/(extent[3] - extent[2])).in_cgs()
 
         size, axrect, caxrect = self._get_best_layout()

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