mailr9478 - /1.3/test_suite/unit_tests/_maths_fns/test_rotation_matrix.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on September 08, 2009 - 17:42:
Author: bugman
Date: Tue Sep  8 17:42:48 2009
New Revision: 9478

URL: http://svn.gna.org/viewcvs/relax?rev=9478&view=rev
Log:
Added a unit test for maths_fns.rotation_matrix.R_to_axis_angle() using R = I.


Modified:
    1.3/test_suite/unit_tests/_maths_fns/test_rotation_matrix.py

Modified: 1.3/test_suite/unit_tests/_maths_fns/test_rotation_matrix.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_maths_fns/test_rotation_matrix.py?rev=9478&r1=9477&r2=9478&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_maths_fns/test_rotation_matrix.py (original)
+++ 1.3/test_suite/unit_tests/_maths_fns/test_rotation_matrix.py Tue Sep  8 
17:42:48 2009
@@ -410,6 +410,19 @@
             self.assertAlmostEqual(z_new[i], z_real[i])
 
 
+    def test_R_to_axis_angle(self):
+        """Test the rotation matrix to axis-angle conversion."""
+
+        # Generate the rotation matrix.
+        R = array([[1, 0, 0], [0, 1, 0], [0, 0, 1]], float64)
+
+        # Get the axis and angle.
+        axis, angle = R_to_axis_angle(R)
+
+        # Test the angle.
+        self.assertEqual(angle, 0.0)
+
+
     def test_R_euler_zyz_alpha_30(self):
         """Test the rotation matrix from zyz Euler angle conversion using a 
beta angle of pi/4."""
 




Related Messages


Powered by MHonArc, Updated Tue Sep 08 18:00:02 2009