1 # -*- coding: utf-8 -*-
5 self.cut_basecurrent=None
6 self.cut_basepoints=None
11 def do_cut(self,args):
15 Cut the selected signal between two points.
16 With the first parameter you have to select the signal (for FS for example
17 you can select with "0" the approacing curve and 1 for the retracting
18 curve. This depend also on how many set of data you have on the graph).
19 With the second parameter you select the output name file for the selection.
20 The data is arranged in two simple column without a header, the first column
21 is the "x" data and the second the "y".
23 Syntax: distance "whatset" "namefile"
26 print "This command need the number of the graph that you want save and a name for the output file."
34 plot=self._get_displayed_plot()
36 print 'Select two points'
37 points=self._measure_N_points(N=2, whatset=whatset)
38 minbound=min(points[0].index, points[1].index)
39 maxbound=max(points[0].index, points[1].index)
40 boundpoints=[minbound, maxbound]
41 yarr=plot.vectors[whatset][1][boundpoints[0]:boundpoints[1]]
42 xarr=plot.vectors[whatset][0][boundpoints[0]:boundpoints[1]]
45 for i in range(len(yarr)):
46 f.write(str(xarr[i])+";"+str(yarr[i])+"\n")