From: fabrizio.benedetti.82 Date: Tue, 11 May 2010 09:23:48 +0000 (+0000) Subject: WLC and FJC output are now with 2 decimal precision. Added a comment on autopeak... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=hooke.git WLC and FJC output are now with 2 decimal precision. Added a comment on autopeak on how to use the 'manual' option --- diff --git a/autopeak.py b/autopeak.py index e39d203..d7974a6 100644 --- a/autopeak.py +++ b/autopeak.py @@ -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 40aaea6..12f04e9 100755 --- 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