Author: bugman Date: Mon Dec 7 10:57:35 2009 New Revision: 10065 URL: http://svn.gna.org/viewcvs/relax?rev=10065&view=rev Log: Bug fix for the calc_rotation() function. The axis permutation for | Azz | >= | Ayy | >= | Axx | is now correctly performed. Modified: 1.3/data/align_tensor.py Modified: 1.3/data/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/1.3/data/align_tensor.py?rev=10065&r1=10064&r2=10065&view=diff ============================================================================== --- 1.3/data/align_tensor.py (original) +++ 1.3/data/align_tensor.py Mon Dec 7 10:57:35 2009 @@ -795,8 +795,17 @@ last_index.pop(min(x_index, z_index)) y_index = last_index[0] - # Return the rotation matrix (with the columns reordered). - return array([rot[:,x_index], rot[:,y_index], rot[:,z_index]]) + # Empty rotation matrix for index permutations. + rot_perm = zeros((3, 3), float64) + + # Permute the rotation matrix. + perm = [x_index, y_index, z_index] + for i in range(3): + for j in range(3): + rot_perm[i, j] = rot[i, perm[j]] + + # Return the permuted rotation matrix. + return rot_perm def calc_unit_x(rotation):