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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Feb 9 09:07:59 PST 2018


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/18d9ec297e91/
Changeset:   18d9ec297e91
User:        pgrete
Date:        2018-02-08 20:27:54+00:00
Summary:     [Bugfix] Calculation of tangential vector components
Affected #:  1 file

diff -r 95c17d0012192d0f659eef870ea025aaba5b7df3 -r 18d9ec297e91d6a358941151f8fc7ace43bd1b2c yt/fields/vector_operations.py
--- a/yt/fields/vector_operations.py
+++ b/yt/fields/vector_operations.py
@@ -124,8 +124,8 @@
         return np.abs(data[ftype, "%s_spherical_radius" % basename])
 
     def _tangential(field, data):
-        return np.sqrt(data[ftype, "%s_magnitude" % basename]**2.0 -
-                       data[ftype, "%s_spherical_radius" % basename]**2.0)
+        return np.sqrt(data[ftype, "%s_spherical_theta" % basename]**2.0 +
+                       data[ftype, "%s_spherical_phi" % basename]**2.0)
 
     registry.add_field((ftype, "radial_%s" % basename), sampling_type="cell", 
                        function=_radial,
@@ -234,7 +234,9 @@
 
     def _tangential_over_magnitude(field, data):
         tr = data[ftype, "tangential_%s" % basename] / \
-             data[ftype, "%s_magnitude" % basename]
+             np.sqrt(data[ftype, "%s_spherical_radius" % basename]**2.0 +
+                     data[ftype, "%s_spherical_theta" % basename]**2.0 +
+                     data[ftype, "%s_spherical_phi" % basename]**2.0)
         return np.abs(tr)
     registry.add_field((ftype, "tangential_over_%s_magnitude" % basename), sampling_type="cell", 
              function=_tangential_over_magnitude,


https://bitbucket.org/yt_analysis/yt/commits/148e462cfbf6/
Changeset:   148e462cfbf6
User:        xarthisius
Date:        2018-02-09 17:07:41+00:00
Summary:     Merge pull request #1688 from pgrete/bulkMag

[Bugfix] Calculation of tangential vector components
Affected #:  1 file

diff -r 68a49fbd15c4b1218cb236d092bdd24083ba5729 -r 148e462cfbf67ea64fa0ca836029a3120d322cf4 yt/fields/vector_operations.py
--- a/yt/fields/vector_operations.py
+++ b/yt/fields/vector_operations.py
@@ -124,8 +124,8 @@
         return np.abs(data[ftype, "%s_spherical_radius" % basename])
 
     def _tangential(field, data):
-        return np.sqrt(data[ftype, "%s_magnitude" % basename]**2.0 -
-                       data[ftype, "%s_spherical_radius" % basename]**2.0)
+        return np.sqrt(data[ftype, "%s_spherical_theta" % basename]**2.0 +
+                       data[ftype, "%s_spherical_phi" % basename]**2.0)
 
     registry.add_field((ftype, "radial_%s" % basename), sampling_type="cell", 
                        function=_radial,
@@ -234,7 +234,9 @@
 
     def _tangential_over_magnitude(field, data):
         tr = data[ftype, "tangential_%s" % basename] / \
-             data[ftype, "%s_magnitude" % basename]
+             np.sqrt(data[ftype, "%s_spherical_radius" % basename]**2.0 +
+                     data[ftype, "%s_spherical_theta" % basename]**2.0 +
+                     data[ftype, "%s_spherical_phi" % basename]**2.0)
         return np.abs(tr)
     registry.add_field((ftype, "tangential_over_%s_magnitude" % basename), sampling_type="cell", 
              function=_tangential_over_magnitude,

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