[yt-svn] commit/yt: samskillman: Fixing a bug when this was moved out of camera.py and into orientation.py. The original north vector fed to the orienter should not be modified, even if steady_north is used.

Bitbucket commits-noreply at bitbucket.org
Thu Sep 13 15:41:24 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/bb29b353e351/
changeset:   bb29b353e351
branch:      yt
user:        samskillman
date:        2012-09-14 00:41:02
summary:     Fixing a bug when this was moved out of camera.py and into orientation.py.  The original north vector fed to the orienter should not be modified, even if steady_north is used.
affected #:  1 file

diff -r 4e6e794f4053f4db788d6d1263163a509439213b -r bb29b353e351c0cadb58459b4348dbfc12145771 yt/utilities/orientation.py
--- a/yt/utilities/orientation.py
+++ b/yt/utilities/orientation.py
@@ -56,6 +56,7 @@
             mylog.error("North vector and normal vector are the same.  Disregarding north vector.")
             north_vector = None
         if north_vector is not None: self.steady_north = True
+        self.north_vector = north_vector
         self._setup_normalized_vectors(normal_vector, north_vector)
 
     def _setup_normalized_vectors(self, normal_vector, north_vector):
@@ -74,7 +75,6 @@
         north_vector /= np.sqrt(np.dot(north_vector, north_vector))
         east_vector /= np.sqrt(np.dot(east_vector, east_vector))
         self.normal_vector = normal_vector
-        self.north_vector = north_vector
         self.unit_vectors = [east_vector, north_vector, normal_vector]
         self.inv_mat = np.linalg.pinv(self.unit_vectors)

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