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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Apr 6 11:29:23 PDT 2016


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/178974598dcc/
Changeset:   178974598dcc
Branch:      yt
User:        mornkr
Date:        2016-03-30 14:21:36+00:00
Summary:     Correcting how theta and phi are calculated in _particle_velocity_spherical_radius, _particle_velocity_spherical_theta, _particle_velocity_cylindrical_radius, and _particle_velocity_cylindrical_radius.
Affected #:  1 file

diff -r b6dad5b69998cff732a5c3ea7847a4b01092ffc8 -r 178974598dcc9a0e0f848a78bbbc094835dd0e49 yt/fields/particle_fields.py
--- a/yt/fields/particle_fields.py
+++ b/yt/fields/particle_fields.py
@@ -493,10 +493,10 @@
         bv = data.get_field_parameter("bulk_velocity")
         pos = data.ds.arr([data[ptype, spos % ax] for ax in "xyz"])
         vel = data.ds.arr([data[ptype, svel % ax] for ax in "xyz"])
+        pos = pos - np.reshape(center, (3, 1))
+        vel = vel - np.reshape(bv, (3, 1))
         theta = get_sph_theta(pos, normal)
         phi = get_sph_phi(pos, normal)
-        pos = pos - np.reshape(center, (3, 1))
-        vel = vel - np.reshape(bv, (3, 1))
         sphr = get_sph_r_component(vel, theta, phi, normal)
         return sphr
 
@@ -536,10 +536,10 @@
         bv = data.get_field_parameter("bulk_velocity")
         pos = data.ds.arr([data[ptype, spos % ax] for ax in "xyz"])
         vel = data.ds.arr([data[ptype, svel % ax] for ax in "xyz"])
+        pos = pos - np.reshape(center, (3, 1))
+        vel = vel - np.reshape(bv, (3, 1))
         theta = get_sph_theta(pos, normal)
         phi = get_sph_phi(pos, normal)
-        pos = pos - np.reshape(center, (3, 1))
-        vel = vel - np.reshape(bv, (3, 1))
         spht = get_sph_theta_component(vel, theta, phi, normal)
         return spht
 
@@ -664,9 +664,9 @@
         bv = data.get_field_parameter("bulk_velocity")
         pos = data.ds.arr([data[ptype, spos % ax] for ax in "xyz"])
         vel = data.ds.arr([data[ptype, svel % ax] for ax in "xyz"])
-        theta = get_cyl_theta(pos, normal)
         pos = pos - np.reshape(center, (3, 1))
         vel = vel - np.reshape(bv, (3, 1))
+        theta = get_cyl_theta(pos, normal)
         cylr = get_cyl_r_component(vel, theta, normal)
         return cylr
 
@@ -688,9 +688,9 @@
         bv = data.get_field_parameter("bulk_velocity")
         pos = data.ds.arr([data[ptype, spos % ax] for ax in "xyz"])
         vel = data.ds.arr([data[ptype, svel % ax] for ax in "xyz"])
-        theta = get_cyl_theta(pos, normal)
         pos = pos - np.reshape(center, (3, 1))
         vel = vel - np.reshape(bv, (3, 1))
+        theta = get_cyl_theta(pos, normal)
         cylt = get_cyl_theta_component(vel, theta, normal)
         return cylt
 


https://bitbucket.org/yt_analysis/yt/commits/0efafb0e5d0f/
Changeset:   0efafb0e5d0f
Branch:      yt
User:        ngoldbaum
Date:        2016-04-06 18:29:14+00:00
Summary:     Merged in mornkr/yt (pull request #2097)

Correcting how theta and phi are calculated in _particle_velocity_spherical_radius, _particle_velocity_spherical_theta, _particle_velocity_cylindrical_radius, and _particle_velocity_cylindrical_theta.
Affected #:  1 file

diff -r 58f3b309fa309c38f23f5a6aecbbedc608b2629d -r 0efafb0e5d0f909bfe66aa9aa8689fdc02ace2be yt/fields/particle_fields.py
--- a/yt/fields/particle_fields.py
+++ b/yt/fields/particle_fields.py
@@ -493,10 +493,10 @@
         bv = data.get_field_parameter("bulk_velocity")
         pos = data.ds.arr([data[ptype, spos % ax] for ax in "xyz"])
         vel = data.ds.arr([data[ptype, svel % ax] for ax in "xyz"])
+        pos = pos - np.reshape(center, (3, 1))
+        vel = vel - np.reshape(bv, (3, 1))
         theta = get_sph_theta(pos, normal)
         phi = get_sph_phi(pos, normal)
-        pos = pos - np.reshape(center, (3, 1))
-        vel = vel - np.reshape(bv, (3, 1))
         sphr = get_sph_r_component(vel, theta, phi, normal)
         return sphr
 
@@ -536,10 +536,10 @@
         bv = data.get_field_parameter("bulk_velocity")
         pos = data.ds.arr([data[ptype, spos % ax] for ax in "xyz"])
         vel = data.ds.arr([data[ptype, svel % ax] for ax in "xyz"])
+        pos = pos - np.reshape(center, (3, 1))
+        vel = vel - np.reshape(bv, (3, 1))
         theta = get_sph_theta(pos, normal)
         phi = get_sph_phi(pos, normal)
-        pos = pos - np.reshape(center, (3, 1))
-        vel = vel - np.reshape(bv, (3, 1))
         spht = get_sph_theta_component(vel, theta, phi, normal)
         return spht
 
@@ -664,9 +664,9 @@
         bv = data.get_field_parameter("bulk_velocity")
         pos = data.ds.arr([data[ptype, spos % ax] for ax in "xyz"])
         vel = data.ds.arr([data[ptype, svel % ax] for ax in "xyz"])
-        theta = get_cyl_theta(pos, normal)
         pos = pos - np.reshape(center, (3, 1))
         vel = vel - np.reshape(bv, (3, 1))
+        theta = get_cyl_theta(pos, normal)
         cylr = get_cyl_r_component(vel, theta, normal)
         return cylr
 
@@ -688,9 +688,9 @@
         bv = data.get_field_parameter("bulk_velocity")
         pos = data.ds.arr([data[ptype, spos % ax] for ax in "xyz"])
         vel = data.ds.arr([data[ptype, svel % ax] for ax in "xyz"])
-        theta = get_cyl_theta(pos, normal)
         pos = pos - np.reshape(center, (3, 1))
         vel = vel - np.reshape(bv, (3, 1))
+        theta = get_cyl_theta(pos, normal)
         cylt = get_cyl_theta_component(vel, theta, normal)
         return cylt

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-svn-spacepope.org/attachments/20160406/57245ca8/attachment.html>


More information about the yt-svn mailing list