[yt-svn] commit/yt-3.0: ngoldbaum: Fixing the off axis velocity callback. (Really, I swear).
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Jun 10 12:05:40 PDT 2013
1 new commit in yt-3.0:
https://bitbucket.org/yt_analysis/yt-3.0/commits/7a79dd9c7ebe/
Changeset: 7a79dd9c7ebe
Branch: yt-3.0
User: ngoldbaum
Date: 2013-06-10 21:03:12
Summary: Fixing the off axis velocity callback. (Really, I swear).
Affected #: 1 file
diff -r 790d2eccfd06764fe7f2e6ca5b749ff246da4390 -r 7a79dd9c7ebefddba48dfe0440a47ca3fddd6b98 yt/data_objects/universal_fields.py
--- a/yt/data_objects/universal_fields.py
+++ b/yt/data_objects/universal_fields.py
@@ -886,6 +886,7 @@
bulk_velocity = np.zeros(3)
v_vec = np.array([data["%s-velocity" % ax] - bv \
for ax, bv in zip('xyz', bulk_velocity)])
+ v_vec = np.rollaxis(v_vec, 0, len(v_vec.shape))
return np.sum(x_vec * v_vec, axis=-1)
add_field("CuttingPlaneVelocityX",
function=_CuttingPlaneVelocityX,
@@ -899,6 +900,7 @@
bulk_velocity = np.zeros(3)
v_vec = np.array([data["%s-velocity" % ax] - bv \
for ax, bv in zip('xyz', bulk_velocity)])
+ v_vec = np.rollaxis(v_vec, 0, len(v_vec.shape))
return np.sum(y_vec * v_vec, axis=-1)
add_field("CuttingPlaneVelocityY",
function=_CuttingPlaneVelocityY,
Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/
--
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