Author: bugman Date: Wed Dec 9 11:25:58 2009 New Revision: 10078 URL: http://svn.gna.org/viewcvs/relax?rev=10078&view=rev Log: Fixed the problem case for R_to_euler_zxy(). Modified: 1.3/maths_fns/rotation_matrix.py Modified: 1.3/maths_fns/rotation_matrix.py URL: http://svn.gna.org/viewcvs/relax/1.3/maths_fns/rotation_matrix.py?rev=10078&r1=10077&r2=10078&view=diff ============================================================================== --- 1.3/maths_fns/rotation_matrix.py (original) +++ 1.3/maths_fns/rotation_matrix.py Wed Dec 9 11:25:58 2009 @@ -1946,10 +1946,10 @@ # The beta Euler angle. beta = asin(-R[1, 2]) - # Problem case - beta is zero so alpha and gamma are indistinguishable. - if -R[1, 2] == 0.0: + # Problem case - beta is pi/2 so alpha and gamma are indistinguishable. + if beta == pi/2: # Put all the rotation into alpha. - alpha = atan2(-R[0, 1], -R[2, 1]) + alpha = atan2(-R[0, 1], R[0, 0]) # Gamma. gamma = 0.0