From b385b943fe2dee63e6370b2cb07d3d616facb241 Mon Sep 17 00:00:00 2001 From: devicerandom Date: Fri, 14 Nov 2008 11:09:28 +0000 Subject: [PATCH] (autopeak.py) autopeak outputs sigma for contour length and persistence length --- autopeak.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/autopeak.py b/autopeak.py index da96fcf..60a73db 100644 --- a/autopeak.py +++ b/autopeak.py @@ -127,6 +127,8 @@ class autopeakCommands: #initialize output data vectors c_lengths=[] p_lengths=[] + sigma_c_lengths=[] + sigma_p_lengths=[] forces=[] slopes=[] @@ -217,7 +219,7 @@ class autopeakCommands: if abs(peak_point.index-other_fit_point.index) < 2: continue - params, yfit, xfit, fit_errors = self.wlc_fit(points, displayed_plot.vectors[1][0], displayed_plot.vectors[1][1], pl_value, T) + params, yfit, xfit, fit_errors = self.wlc_fit(points, displayed_plot.vectors[1][0], displayed_plot.vectors[1][1], pl_value, T, return_errors=True) #Measure forces @@ -233,6 +235,8 @@ class autopeakCommands: if len(params)==1: #if we did choose 1-value fit p_lengths.append(pl_value) c_lengths.append(params[0]*(1.0e+9)) + sigma_p_lengths.append(0) + sigma_c_lengths.append(fit_errors[0]*(1.0e+9)) forces.append(abs(y-avg)*(1.0e+12)) slopes.append(slope) #Add WLC fit lines to plot @@ -241,12 +245,14 @@ class autopeakCommands: fitplot.styles=[] else: fitplot.styles.append(None) - else: + else: #2-value fit p_leng=params[1]*(1.0e+9) #check if persistent length makes sense. otherwise, discard peak. if p_leng>self.config['auto_min_p'] and p_leng