From 92d41a1da993debe1a484ba08ca30e442bacb1ee Mon Sep 17 00:00:00 2001 From: devicerandom Date: Sun, 1 Nov 2009 17:20:21 +0000 Subject: [PATCH] (autopeak.py) autopeak can now use FJC or WLC --- autopeak.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/autopeak.py b/autopeak.py index ffacd82..9176c01 100644 --- a/autopeak.py +++ b/autopeak.py @@ -238,9 +238,17 @@ 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, return_errors=True) - + if self.config['fit_function']=='wlc': + 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) + elif self.config['fit_function']=='fjc': + params, yfit, xfit, fit_errors = self.fjc_fit(points, displayed_plot.vectors[1][0], displayed_plot.vectors[1][1], pl_value, T, return_errors=True) + else: + print 'Unknown fit function' + print 'Please set fit_function as wlc or fjc' + return + + #Measure forces delta_to_measure=displayed_plot.vectors[1][1][peak-delta_force:peak+delta_force] y=min(delta_to_measure) @@ -298,6 +306,7 @@ class autopeakCommands: self._send_plot([fitplot]) #self.do_peaks('') + print 'Using fit function: ',self.config['fit_function'] print 'Measurements for all peaks detected:' print 'contour (nm)', c_lengths print 'sigma contour (nm)',sigma_c_lengths -- 2.26.2