[yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Wed Sep 26 16:59:23 PDT 2012
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/2067e8120c89/
changeset: 2067e8120c89
branch: yt
user: Andrew Myers
date: 2012-09-27 01:43:22
summary: a couple of fixes needed to get velocity callbacks to work with off-axis slices
affected #: 2 files
diff -r 0527d1fab20f743137c8173243ef26938a83f6ec -r 2067e8120c892e3edcdbdb363cc92a678dc2c722 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -650,8 +650,8 @@
plot.data[self.field_y],
int(nx), int(ny),
(x0, x1, y0, y1),).transpose()
- X = np.mgrid[0:plot.image._A.shape[0]-1:nx*1j]# + 0.5*factor
- Y = np.mgrid[0:plot.image._A.shape[1]-1:ny*1j]# + 0.5*factor
+ X,Y = np.meshgrid(np.linspace(xx0,xx1,nx,endpoint=True),
+ np.linspace(yy0,yy1,ny,endpoint=True))
plot._axes.quiver(X,Y, pixX, pixY)
plot._axes.set_xlim(xx0,xx1)
plot._axes.set_ylim(yy0,yy1)
diff -r 0527d1fab20f743137c8173243ef26938a83f6ec -r 2067e8120c892e3edcdbdb363cc92a678dc2c722 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -103,7 +103,10 @@
self.pf = frb.pf
self.xlim = viewer.xlim
self.ylim = viewer.ylim
- self._type_name = ''
+ if 'Cutting' in self.data.__class__.__name__:
+ self._type_name = "CuttingPlane"
+ else:
+ self._type_name = ''
class FieldTransform(object):
def __init__(self, name, func, locator):
@@ -179,7 +182,6 @@
(normal,perp1,perp2) = ortho_find(normal)
mat = np.transpose(np.column_stack((perp1,perp2,normal)))
center = np.dot(mat,center)
- width = width/pf.domain_width.min()
bounds = [-width[0]/2, width[0]/2, -width[1]/2, width[1]/2]
https://bitbucket.org/yt_analysis/yt/changeset/2359ab1ceea9/
changeset: 2359ab1ceea9
branch: yt
user: ngoldbaum
date: 2012-09-27 01:59:21
summary: Merged in atmyers/yt (pull request #282)
affected #: 2 files
diff -r 5af7cb598179b93a2162b6aa8605d70cb2776b90 -r 2359ab1ceea99e0db1f47adcc45ae00f50eaed12 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -650,8 +650,8 @@
plot.data[self.field_y],
int(nx), int(ny),
(x0, x1, y0, y1),).transpose()
- X = np.mgrid[0:plot.image._A.shape[0]-1:nx*1j]# + 0.5*factor
- Y = np.mgrid[0:plot.image._A.shape[1]-1:ny*1j]# + 0.5*factor
+ X,Y = np.meshgrid(np.linspace(xx0,xx1,nx,endpoint=True),
+ np.linspace(yy0,yy1,ny,endpoint=True))
plot._axes.quiver(X,Y, pixX, pixY)
plot._axes.set_xlim(xx0,xx1)
plot._axes.set_ylim(yy0,yy1)
diff -r 5af7cb598179b93a2162b6aa8605d70cb2776b90 -r 2359ab1ceea99e0db1f47adcc45ae00f50eaed12 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -106,7 +106,10 @@
self.pf = frb.pf
self.xlim = viewer.xlim
self.ylim = viewer.ylim
- self._type_name = ''
+ if 'Cutting' in self.data.__class__.__name__:
+ self._type_name = "CuttingPlane"
+ else:
+ self._type_name = ''
class FieldTransform(object):
def __init__(self, name, func, locator):
@@ -182,7 +185,6 @@
(normal,perp1,perp2) = ortho_find(normal)
mat = np.transpose(np.column_stack((perp1,perp2,normal)))
center = np.dot(mat,center)
- width = width/pf.domain_width.min()
bounds = [-width[0]/2, width[0]/2, -width[1]/2, width[1]/2]
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