From 44cd77500c03244ca3de2fbd3620cacd56da2aec Mon Sep 17 00:00:00 2001 From: devicerandom Date: Tue, 3 Mar 2009 15:58:29 +0000 Subject: [PATCH] (generalvclamp.py) now linefit_between accepts whatset --- generalvclamp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generalvclamp.py b/generalvclamp.py index e200a59..ebd3e08 100644 --- a/generalvclamp.py +++ b/generalvclamp.py @@ -270,7 +270,7 @@ class generalvclampCommands: self._send_plot([lineplot]) - def linefit_between(self,index1,index2): + def linefit_between(self,index1,index2,whatset=1): ''' Creates two vectors (xtofit,ytofit) slicing out from the current return trace a portion delimited by the two indexes @@ -282,8 +282,8 @@ class generalvclampCommands: (c) Marco Brucale, Massimo Sandal 2008 ''' # Translates the indexes into two vectors containing the x,y data to fit - xtofit=self.plots[0].vectors[1][0][index1:index2] - ytofit=self.plots[0].vectors[1][1][index1:index2] + xtofit=self.plots[0].vectors[whatset][0][index1:index2] + ytofit=self.plots[0].vectors[whatset][1][index1:index2] # Does the actual linear fitting (simple least squares with numpy.polyfit) linefit=[] -- 2.26.2