From 974c94bcef71b24572bdd1a06cc609b474f62907 Mon Sep 17 00:00:00 2001 From: albertogomcas Date: Wed, 17 Mar 2010 05:09:10 +0000 Subject: [PATCH] multifit.py : slope can be measured manually generalvclamp.py : change color of slope line to black --- generalvclamp.py | 4 ++-- multifit.py | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/generalvclamp.py b/generalvclamp.py index 3e534a9..0795312 100644 --- a/generalvclamp.py +++ b/generalvclamp.py @@ -304,9 +304,9 @@ class generalvclampCommands: else: lineplot.styles+=[None,'scatter'] if lineplot.colors==[]: - lineplot.styles=[None,None,None,None] + lineplot.colors=[None,None,'black',None] else: - lineplot.colors+=[None,None] + lineplot.colors+=['black',None] self._send_plot([lineplot]) diff --git a/multifit.py b/multifit.py index 5c36c5a..e426799 100644 --- a/multifit.py +++ b/multifit.py @@ -57,7 +57,9 @@ class multifitCommands: slopew and basew : width in points for slope fitting (points to the right of clicked rupture) and base level fitting (points to - the left of clicked top of rupture), default is 15. + the left of clicked top of rupture). + If slopew is not provided, the routine will ask for a 5th + point to fit the slope. DO NOT put spaces between 'slopew' or 'basew', '=' value. justone : performs the fits over current curve instead of iterating @@ -73,7 +75,7 @@ class multifitCommands: pl_value=None kl_value=None T=self.config['temperature'] - slopew=15 + slopew=None basew=15 justone=False @@ -171,6 +173,9 @@ class multifitCommands: wlcpoints=self._measure_N_points(N=2,whatset=1) print 'And one point of the top of the jump' toppoint=self._measure_N_points(N=1,whatset=1) + if slopew==None: + print 'Click a point to calculate slope' + slopepoint=self._measure_N_points(N=1,whatset=1) fitpoints=[contact_point]+wlcpoints #use the currently displayed plot for the fit @@ -202,7 +207,10 @@ class multifitCommands: force=toplevel-ruptpoint.graph_coords[1] #Measure the slope - loading rate - slope=self._slope([ruptpoint],slopew) + if slopew==None: + slope=self._slope([ruptpoint]+slopepoint,slopew) + else: + slope=self.slope([ruptpoint],slopew) #plot results (_slope already did) -- 2.26.2