[yt-svn] commit/yt: ngoldbaum: Merged in atmyers/yt (pull request #1806)

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


1 new commit in yt:

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