mailr25869 - /branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py


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

Header


Content

Posted by edward on September 17, 2014 - 17:11:
Author: bugman
Date: Wed Sep 17 17:11:23 2014
New Revision: 25869

URL: http://svn.gna.org/viewcvs/relax?rev=25869&view=rev
Log:
Improved the print out formatting for the count_sobol_points() frame order 
function.

Modified:
    branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py

Modified: 
branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py?rev=25869&r1=25868&r2=25869&view=diff
==============================================================================
--- 
branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py  
(original)
+++ 
branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py  
Wed Sep 17 17:11:23 2014
@@ -63,7 +63,7 @@
     """
 
     # Printout.
-    print("Sobol' quasi-random integration point counting for the current 
parameter values.")
+    print("\nSobol' quasi-random integration point counting for the current 
parameter values.")
 
     # Checks.
     if not check_model(escalate=1):
@@ -158,12 +158,14 @@
     cdp.used_sobol_points = count
 
     # Printout.
-    print("\n%-20s %20s" % ("Maximum number of points:", 
cdp.sobol_max_points))
-    print("%-20s %20s" % ("Oversampling factor:", cdp.sobol_oversample))
-    print("%-20s %20s" % ("Total points:", total_num))
-    print("%-20s %20s" % ("Used points:", count))
+    format = "    %-30s %20s\n"
+    sys.stdout.write(format % ("Maximum number of points:", 
cdp.sobol_max_points))
+    sys.stdout.write(format % ("Oversampling factor:", cdp.sobol_oversample))
+    sys.stdout.write(format % ("Total points:", total_num))
+    sys.stdout.write(format % ("Used points:", count))
     percent = "%s" % (float(count)/float(total_num)*100) + '%'
-    print("%-20s %20s" % ("Percentage:", percent))
+    sys.stdout.write(format % ("Percentage:", percent))
+    sys.stdout.write('\n')
 
 
 def grid_row(incs, lower, upper, dist_type=None, end_point=True):




Related Messages


Powered by MHonArc, Updated Wed Sep 17 17:20:03 2014