mailr10060 - /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 04, 2009 - 17:41:
Author: bugman
Date: Fri Dec  4 17:41:09 2009
New Revision: 10060

URL: http://svn.gna.org/viewcvs/relax?rev=10060&view=rev
Log:
Added the anisotropic Aa and rhombic Ar parameters to the alignment tensor 
object.


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=10060&r1=10059&r2=10060&view=diff
==============================================================================
--- 1.3/data/align_tensor.py (original)
+++ 1.3/data/align_tensor.py Fri Dec  4 17:41:09 2009
@@ -146,6 +146,46 @@
     return tensor_diag
 
 
+def calc_Aa(A):
+    """Calculate the anisotropic parameter Aa.
+
+    This is given by::
+
+        Aa = 3/2Azz = Szz,
+
+    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
+    """
+
+    # Return Aa.
+    return 1.5 * A[2, 2]
+
+
+def calc_Ar(A):
+    """Calculate the rhombic parameter Ar.
+
+    This is given by::
+
+        Ar = Axx - Ayy,
+
+    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
+    """
+
+    # Return Ar.
+    return A[0, 0] - A[1, 1]
+
+
 def calc_Axxyy(Axx, Ayy):
     """Function for calculating the Axx-yy value.
 
@@ -809,6 +849,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 ('unit_x',        ['Axx', 'Ayy', 'Axy', 'Axz', 'Ayz'],            
['R'])
     yield ('unit_y',        ['Axx', 'Ayy', 'Axy', 'Axz', 'Ayz'],            
['R'])
     yield ('unit_z',        ['Axx', 'Ayy', 'Axy', 'Axz', 'Ayz'],            
['R'])




Related Messages


Powered by MHonArc, Updated Fri Dec 04 18:00:02 2009