[yt-svn] commit/yt: xarthisius: Fix clumps callback to use proper cell size for projections other than xy
Bitbucket
commits-noreply at bitbucket.org
Thu Dec 13 06:35:52 PST 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/766b567fa9c3/
changeset: 766b567fa9c3
branch: yt
user: xarthisius
date: 2012-12-13 15:32:07
summary: Fix clumps callback to use proper cell size for projections other than xy
affected #: 1 file
diff -r 56d943997200890878efeb39e2d7bfbe029d80a1 -r 766b567fa9c3e628d109e16111ecdc921c1db127 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -658,24 +658,25 @@
xf = axis_names[px_index]
yf = axis_names[py_index]
+ dxf = "d%s" % xf
+ dyf = "d%s" % yf
DomainRight = plot.data.pf.domain_right_edge
DomainLeft = plot.data.pf.domain_left_edge
DomainWidth = DomainRight - DomainLeft
-
+
nx, ny = plot.image._A.shape
buff = np.zeros((nx,ny),dtype='float64')
for i,clump in enumerate(reversed(self.clumps)):
mylog.debug("Pixelizing contour %s", i)
-
xf_copy = clump[xf].copy()
yf_copy = clump[yf].copy()
-
- temp = _MPL.Pixelize(xf_copy, yf_copy,
- clump['dx']/2.0,
- clump['dy']/2.0,
- clump['dx']*0.0+i+1, # inits inside Pixelize
+
+ temp = _MPL.Pixelize(xf_copy, yf_copy,
+ clump[dxf]/2.0,
+ clump[dyf]/2.0,
+ clump[dxf]*0.0+i+1, # inits inside Pixelize
int(nx), int(ny),
(x0, x1, y0, y1), 0).transpose()
buff = np.maximum(temp, buff)
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