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


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to