mailr4629 - /branches/N_state_model/generic_fns/align_tensor.py


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

Header


Content

Posted by edward on January 11, 2008 - 11:10:
Author: bugman
Date: Fri Jan 11 11:10:44 2008
New Revision: 4629

URL: http://svn.gna.org/viewcvs/relax?rev=4629&view=rev
Log:
Updated generic_fns.align_tensor.svd() to use the tensors arg.


Modified:
    branches/N_state_model/generic_fns/align_tensor.py

Modified: branches/N_state_model/generic_fns/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/generic_fns/align_tensor.py?rev=4629&r1=4628&r2=4629&view=diff
==============================================================================
--- branches/N_state_model/generic_fns/align_tensor.py (original)
+++ branches/N_state_model/generic_fns/align_tensor.py Fri Jan 11 11:10:44 
2008
@@ -1316,7 +1316,7 @@
         fold_angles()
 
 
-def svd(basis_set=0):
+def svd(basis_set=0, tensors=None):
     """Function for calculating the singular values of all the loaded 
tensors.
 
     The matrix on which SVD will be performed is:
@@ -1347,6 +1347,12 @@
         Sxxyy = Sxx - Syy,
 
     The SVD values and condition number are dependendent upon the basis set 
chosen.
+
+
+    @param basis_set:   The basis set to create the 5 by n matrix on which 
to perform SVD.
+    @type basis_set:    int
+    @param tensors:     An array of tensors to apply SVD to.  If None, all 
tensors will be used.
+    @type tensors:      None or array of str
     """
 
     # Alias the current data pipe.
@@ -1362,6 +1368,10 @@
     # Pack the elements.
     i = 0
     for tensor in cdp.align_tensor:
+        # Skip tensors.
+        if tensors and tensor.name not in tensors:
+            continue
+
         # Unitary basis set.
         if basis_set == 0:
             matrix[i,0] = tensor.Sxx




Related Messages


Powered by MHonArc, Updated Fri Jan 11 11:20:08 2008