[yt-svn] commit/yt: chummels: Merged in jzuhone/yt (pull request #1634)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Jul 10 18:20:00 PDT 2015


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/b34ec79bbd55/
Changeset:   b34ec79bbd55
Branch:      yt
User:        chummels
Date:        2015-07-11 01:19:52+00:00
Summary:     Merged in jzuhone/yt (pull request #1634)

[bugfix] Bug fixes for particle plots
Affected #:  2 files

diff -r f06003cb29f0f743c02cd8543da8385787151677 -r b34ec79bbd55d2aa56e047de9dc67d0f4256699c yt/visualization/fixed_resolution.py
--- a/yt/visualization/fixed_resolution.py
+++ b/yt/visualization/fixed_resolution.py
@@ -564,7 +564,7 @@
                                       input_units=weight_data.units,
                                       info=self._get_info(item))
 
-            locs = np.where(ia > 0)
+            locs = np.where(weight_array > 0)
             ia[locs] /= weight_array[locs]
 
         self.data[item] = ia

diff -r f06003cb29f0f743c02cd8543da8385787151677 -r b34ec79bbd55d2aa56e047de9dc67d0f4256699c yt/visualization/particle_plots.py
--- a/yt/visualization/particle_plots.py
+++ b/yt/visualization/particle_plots.py
@@ -205,6 +205,9 @@
         if field_parameters is None:
             field_parameters = {}
 
+        if axes_unit is None:
+            axes_unit = get_axes_unit(width, ds)
+
         # if no fields are passed in, we simply mark the x and
         # y fields using a given color. Use the 'particle_ones'
         # field to do this. We also turn off the colorbar in
@@ -225,7 +228,7 @@
         width = np.zeros_like(center)
         width[x_coord] = bounds[1] - bounds[0]
         width[y_coord] = bounds[3] - bounds[2]
-        width[axis] = depth[0]
+        width[axis] = depth[0].in_units(width[x_coord].units)
 
         ParticleSource = ParticleAxisAlignedDummyDataSource(center, ds, axis,
                                         width, fields, weight_field,
@@ -236,8 +239,7 @@
                              fontsize=fontsize, fields=fields,
                              window_size=window_size, aspect=aspect,
                              splat_color=splat_color)
-        if axes_unit is None:
-            axes_unit = get_axes_unit(width, ds)
+
         self.set_axes_unit(axes_unit)
 
         if self._use_cbar is False:

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