mailr10064 - /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 December 07, 2009 - 08:33:
Author: bugman
Date: Mon Dec  7 08:33:06 2009
New Revision: 10064

URL: http://svn.gna.org/viewcvs/relax?rev=10064&view=rev
Log:
Bug fixes for the calculation of the anisotropic and rhombic alignment tensor 
parameters.


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=10064&r1=10063&r2=10064&view=diff
==============================================================================
--- 1.3/data/align_tensor.py (original)
+++ 1.3/data/align_tensor.py Mon Dec  7 08:33:06 2009
@@ -146,7 +146,7 @@
     return tensor_diag
 
 
-def calc_Aa(A):
+def calc_Aa(A_diag):
     """Calculate the anisotropic parameter Aa.
 
     This is given by::
@@ -156,17 +156,17 @@
     where Azz and Szz are the eigenvalues.
 
 
-    @param A:   The full alignment tensor.
-    @type A:    numpy array ((3, 3), float64)
-    @return:    The Aa parameter
-    @rtype:     float
+    @param A_diag:  The full alignment tensor, diagonalised.
+    @type A_diag:   numpy array ((3, 3), float64)
+    @return:        The Aa parameter
+    @rtype:         float
     """
 
     # Return Aa.
-    return 1.5 * A[2, 2]
-
-
-def calc_Ar(A):
+    return 1.5 * A_diag[2, 2]
+
+
+def calc_Ar(A_diag):
     """Calculate the rhombic parameter Ar.
 
     This is given by::
@@ -176,14 +176,14 @@
     where Axx and Ayy are the eigenvalues.
 
 
-    @param A:   The full alignment tensor.
-    @type A:    numpy array ((3, 3), float64)
-    @return:    The Ar parameter
-    @rtype:     float
+    @param A_diag:  The full alignment tensor, diagonalised.
+    @type A_diag:   numpy array ((3, 3), float64)
+    @return:        The Ar parameter
+    @rtype:         float
     """
 
     # Return Ar.
-    return A[0, 0] - A[1, 1]
+    return A_diag[0, 0] - A_diag[1, 1]
 
 
 def calc_Axxyy(Axx, Ayy):
@@ -249,7 +249,7 @@
     return [vals[x_index], vals[y_index], vals[z_index]]
 
 
-def calc_eta(A):
+def calc_eta(A_diag):
     """Calculate the asymmetry parameter eta.
 
     This is given by::
@@ -259,14 +259,14 @@
     where Aii are the eigenvalues.
 
 
-    @param A:   The full alignment tensor.
-    @type A:    numpy array ((3, 3), float64)
-    @return:    The eta parameter
-    @rtype:     float
+    @param A_diag:  The full alignment tensor, diagonalised.
+    @type A_diag:   numpy array ((3, 3), float64)
+    @return:        The eta parameter
+    @rtype:         float
     """
 
     # Return eta.
-    return (A[0, 0] - A[1, 1]) / A[2, 2]
+    return (A_diag[0, 0] - A_diag[1, 1]) / A_diag[2, 2]
 
 
 def calc_euler(rotation):
@@ -889,9 +889,9 @@
     yield ('Szz',           ['Axx', 'Ayy'],                                 
['Sxx', 'Syy'])
 
     # Tertiary objects (dependant on the secondary objects).
-    yield ('Aa',            ['Axx', 'Ayy', 'Axy', 'Axz', 'Ayz'],            
['A'])
-    yield ('Ar',            ['Axx', 'Ayy', 'Axy', 'Axz', 'Ayz'],            
['A'])
-    yield ('eta',           ['Axx', 'Ayy', 'Axy', 'Axz', 'Ayz'],            
['A'])
+    yield ('Aa',            ['Axx', 'Ayy', 'Axy', 'Axz', 'Ayz'],            
['A_diag'])
+    yield ('Ar',            ['Axx', 'Ayy', 'Axy', 'Axz', 'Ayz'],            
['A_diag'])
+    yield ('eta',           ['Axx', 'Ayy', 'Axy', 'Axz', 'Ayz'],            
['A_diag'])
 
     yield ('unit_x',        ['Axx', 'Ayy', 'Axy', 'Axz', 'Ayz'],            
['rotation'])
     yield ('unit_y',        ['Axx', 'Ayy', 'Axy', 'Axz', 'Ayz'],            
['rotation'])




Related Messages


Powered by MHonArc, Updated Mon Dec 07 11:00:02 2009