WLC and FJC output are now with 2 decimal precision. Added a comment on autopeak... master
authorfabrizio.benedetti.82 <devnull@localhost>
Tue, 11 May 2010 09:23:48 +0000 (09:23 +0000)
committerfabrizio.benedetti.82 <devnull@localhost>
Tue, 11 May 2010 09:23:48 +0000 (09:23 +0000)
autopeak.py
fit.py

index e39d20395bee55fb17678aebb8825d14b6921003..d7974a6071de0993b106584b3cfd6016cb71306f 100644 (file)
@@ -40,7 +40,7 @@ class autopeakCommands:
                      Scientific notation like 0.35e-9 is fine.
 
         manual=[value]:  Allow to choose the peaks to analyze. It need, as a value, the number
-                         of the peaks to analyze.
+                         of the peaks to analyze. NOTE: It have to be used with the manual selection of the baseline.
 
         t=[value] : Use a user-defined temperature. The value must be in
                     kelvins; by default it is 293 K.
diff --git a/fit.py b/fit.py
index 40aaea63e16e30d2663fe53beef20557e0592749..12f04e9d2c9f0a65fe7154882206bad441570272 100755 (executable)
--- a/fit.py
+++ b/fit.py
@@ -719,21 +719,21 @@ class fitCommands:
         
         #FIXME: print "Kuhn length" for FJC
         print 'Fit function:',self.config['fit_function']
-        print 'Contour length: ',params[0]*(1.0e+9),' nm'
-        to_dump='contour '+self.current.path+' '+str(params[0]*(1.0e+9))+' nm'
+        print 'Contour length: %.2f nm' %(params[0]*(1.0e+9))
+        to_dump='contour '+self.current.path+' %.2f nm'%(params[0]*(1.0e+9))
         self.outlet.push(to_dump)
         if len(params)==2: #if we did choose 2-value fit
-            print name_of_charlength+': ',params[1]*(1.0e+9),' nm'
-            to_dump='persistent '+self.current.path+' '+str(params[1]*(1.0e+9))+' nm'
+            print name_of_charlength+': %.2f nm' %(params[1]*(1.0e+9))
+            to_dump='persistent '+self.current.path+' %.2f nm' %(params[1]*(1.0e+9))
             self.outlet.push(to_dump)
         
         if fit_errors:
             fit_nm=[i*(10**9) for i in fit_errors]
-            print 'Standard deviation (contour length)', fit_nm[0]
+            print 'Standard deviation (contour length) %.2f' %fit_nm[0]
             if len(fit_nm)>1:
-                print 'Standard deviation ('+name_of_charlength+')', fit_nm[1]
+                print 'Standard deviation ('+name_of_charlength+') %.2f' %fit_nm[1]
         
-        print 'Fit quality: '+str(qstd/np.std(displayed_plot.vectors[1][1][-20:-1]))
+        print 'Fit quality: %.3f ' %(qstd/np.std(displayed_plot.vectors[1][1][-20:-1]))
             
             
         #add the clicked points in the final PlotObject