Author: bugman Date: Wed Nov 25 18:38:37 2015 New Revision: 28118 URL: http://svn.gna.org/viewcvs/relax?rev=28118&view=rev Log: Improved the printouts from the relax library principle component analysis.
This is in the pca_analysis() function of the lib.structure.pca module. 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=28118&r1=28117&r2=28118&view=diff ============================================================================== --- trunk/lib/structure/pca.py (original) +++ trunk/lib/structure/pca.py Wed Nov 25 18:38:37 2015 @@ -103,6 +103,7 @@ # Perform an eigenvalue decomposition of the covariance matrix. if algorithm == 'eigen': + text = 'eigenvalues' values, vectors = eigh(covariance_matrix) # Sort the values and vectors. @@ -112,6 +113,7 @@ # Perform a singular value decomposition of the covariance matrix. elif algorithm == 'svd': + text = 'singular values' vectors, values, V = svd(covariance_matrix) # Invalid algorithm. @@ -119,9 +121,9 @@ raise RelaxError("The '%s' algorithm is unknown. It should be either 'eigen' or 'svd'." % algorithm) # Printout. - print("\nThe eigenvalues/singular values are:") + print("\nThe %s in Angstrom are:" % text) for i in range(num_modes): - print("Mode %i: %10.5f" % (i+1, values[i])) + print("Mode %i: %15.5f" % (i+1, values[i])) # Calculate the projection for each structure. proj = zeros((num_modes, M), float64) _______________________________________________ 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