mailr8894 - /1.3/data/align_tensor.py


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

Header


Content

Posted by edward on March 02, 2009 - 17:26:
Author: bugman
Date: Mon Mar  2 17:26:48 2009
New Revision: 8894

URL: http://svn.gna.org/viewcvs/relax?rev=8894&view=rev
Log:
Fix for the calc_tensor_diag() function.

The algorithm for finding Ayy was broken.


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=8894&r1=8893&r2=8894&view=diff
==============================================================================
--- 1.3/data/align_tensor.py (original)
+++ 1.3/data/align_tensor.py Mon Mar  2 17:26:48 2009
@@ -529,13 +529,13 @@
     # The eigenvalues.
     vals = eigvals(tensor)
 
-    # Find the x < y < z indices.
+    # Find the |x| < |y| < |z| indices.
     abs_vals = abs(vals).tolist()
     Axx_index = abs_vals.index(min(abs_vals))
     Azz_index = abs_vals.index(max(abs_vals))
     last_index = range(3)
-    last_index.pop(Axx_index)
-    last_index.pop(Azz_index)
+    last_index.pop(max(Axx_index, Azz_index))
+    last_index.pop(min(Axx_index, Azz_index))
     Ayy_index = last_index[0]
 
     # Empty tensor.




Related Messages


Powered by MHonArc, Updated Mon Mar 02 17:40:02 2009