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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Oct 15 16:21:22 PDT 2015


4 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/ea2057940fb4/
Changeset:   ea2057940fb4
Branch:      yt
User:        atmyers
Date:        2015-10-15 19:49:41+00:00
Summary:     fixing a bug in the get_camera method of Scene
Affected #:  1 file

diff -r 562b253b734a3abc182b712fb9009034ea3b36c6 -r ea2057940fb40d09cc0bf5d07a6a07725b03f00f yt/visualization/volume_rendering/scene.py
--- a/yt/visualization/volume_rendering/scene.py
+++ b/yt/visualization/volume_rendering/scene.py
@@ -204,7 +204,7 @@
         """
         self.camera = camera
 
-    def get_camera(self, camera):
+    def get_camera(self):
         r"""
 
         Get the camera currently used by this scene.


https://bitbucket.org/yt_analysis/yt/commits/17b4c9aefff2/
Changeset:   17b4c9aefff2
Branch:      yt
User:        atmyers
Date:        2015-10-15 22:56:34+00:00
Summary:     If you change the normal vector to be inconsistent with the current north vector, this forces a recomputation of the north_vector
Affected #:  1 file

diff -r ea2057940fb40d09cc0bf5d07a6a07725b03f00f -r 17b4c9aefff2cab04e0a3e60ac5a5bd0c981475b yt/utilities/orientation.py
--- a/yt/utilities/orientation.py
+++ b/yt/utilities/orientation.py
@@ -75,7 +75,7 @@
             # The north_vector calculated here will still be included in self.unit_vectors.
             north_vector = np.cross(normal_vector, east_vector).ravel()
         else:
-            if self.steady_north:
+            if self.steady_north or (np.dot(north_vector, normal_vector) != 0.0):
                 north_vector = north_vector - np.dot(north_vector,normal_vector)*normal_vector
             east_vector = np.cross(north_vector, normal_vector).ravel()
         north_vector /= np.sqrt(np.dot(north_vector, north_vector))


https://bitbucket.org/yt_analysis/yt/commits/83006459f4ed/
Changeset:   83006459f4ed
Branch:      yt
User:        atmyers
Date:        2015-10-15 23:00:11+00:00
Summary:     Set the position attribute of the camera for off axis projections
Affected #:  1 file

diff -r 17b4c9aefff2cab04e0a3e60ac5a5bd0c981475b -r 83006459f4edb07099ca765ad842045cf2a60b33 yt/visualization/volume_rendering/off_axis_projection.py
--- a/yt/visualization/volume_rendering/off_axis_projection.py
+++ b/yt/visualization/volume_rendering/off_axis_projection.py
@@ -152,6 +152,7 @@
     camera.set_width(width)
     camera.switch_orientation(normal_vector=normal_vector,
                               north_vector=north_vector)
+    camera.position = center - width[2]*camera.normal_vector
     camera.focus = center
     sc.camera = camera
     sc.add_source(vol)


https://bitbucket.org/yt_analysis/yt/commits/a1857fbd7d50/
Changeset:   a1857fbd7d50
Branch:      yt
User:        ngoldbaum
Date:        2015-10-15 23:21:13+00:00
Summary:     Merged in atmyers/yt (pull request #1806)

[Experimental] [Bugfix] Fixing Off-Axis Projections
Affected #:  3 files

diff -r 009bb61a3f0e8fb34991c79cbdd6a78fdcff2546 -r a1857fbd7d50ee6060bb8e2b0a74ceb6baf118a7 yt/utilities/orientation.py
--- a/yt/utilities/orientation.py
+++ b/yt/utilities/orientation.py
@@ -75,7 +75,7 @@
             # The north_vector calculated here will still be included in self.unit_vectors.
             north_vector = np.cross(normal_vector, east_vector).ravel()
         else:
-            if self.steady_north:
+            if self.steady_north or (np.dot(north_vector, normal_vector) != 0.0):
                 north_vector = north_vector - np.dot(north_vector,normal_vector)*normal_vector
             east_vector = np.cross(north_vector, normal_vector).ravel()
         north_vector /= np.sqrt(np.dot(north_vector, north_vector))

diff -r 009bb61a3f0e8fb34991c79cbdd6a78fdcff2546 -r a1857fbd7d50ee6060bb8e2b0a74ceb6baf118a7 yt/visualization/volume_rendering/off_axis_projection.py
--- a/yt/visualization/volume_rendering/off_axis_projection.py
+++ b/yt/visualization/volume_rendering/off_axis_projection.py
@@ -152,6 +152,7 @@
     camera.set_width(width)
     camera.switch_orientation(normal_vector=normal_vector,
                               north_vector=north_vector)
+    camera.position = center - width[2]*camera.normal_vector
     camera.focus = center
     sc.camera = camera
     sc.add_source(vol)

diff -r 009bb61a3f0e8fb34991c79cbdd6a78fdcff2546 -r a1857fbd7d50ee6060bb8e2b0a74ceb6baf118a7 yt/visualization/volume_rendering/scene.py
--- a/yt/visualization/volume_rendering/scene.py
+++ b/yt/visualization/volume_rendering/scene.py
@@ -204,7 +204,7 @@
         """
         self.camera = camera
 
-    def get_camera(self, camera):
+    def get_camera(self):
         r"""
 
         Get the camera currently used by this scene.

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