mailr28105 - /trunk/lib/structure/pca.py


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

Header


Content

Posted by edward on November 25, 2015 - 18:38:
Author: bugman
Date: Wed Nov 25 18:38:08 2015
New Revision: 28105

URL: http://svn.gna.org/viewcvs/relax?rev=28105&view=rev
Log:
The PCA analysis function in the relax library is now returning data.

This includes the PCA values and vectors, and the per structure projections.

Modified:
    trunk/lib/structure/pca.py

Modified: trunk/lib/structure/pca.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/structure/pca.py?rev=28105&r1=28104&r2=28105&view=diff
==============================================================================
--- trunk/lib/structure/pca.py  (original)
+++ trunk/lib/structure/pca.py  Wed Nov 25 18:38:08 2015
@@ -82,6 +82,8 @@
     @type algorithm:        str
     @keyword num_modes:     The number of PCA modes to calculate.
     @type num_modes:        int
+    @return:                The PCA values and vectors, and the per 
structure projections.
+    @rtype:                 numpy rank-1 array, numpy rank-3 array, numpy 
rank2 array
     """
 
     # Init.
@@ -121,3 +123,7 @@
 
     # Truncation to the desired number of modes.
     values = values[:num_modes]
+    vectors = vectors[:,:num_modes].reshape((3, N, num_modes))
+
+    # Return the results.
+    return values, vectors, proj




Related Messages


Powered by MHonArc, Updated Wed Nov 25 18:40:03 2015