3 """This plugin contains a plotmanipulator to show the convoluted curve.
8 class showconvolutedCommands:
10 #def _plug_init(self):
13 def plotmanip_showconvoluted(self, plot, curve):
15 BEGIN: taken from procplots.py
16 might need some tweaking
18 #use only for force spectroscopy experiments!
19 if curve.driver.experiment != 'smfs':
23 END: taken from procplots.py
26 #need to convert the string that contains the list into a list
27 #convolution = eval(self.config['convfilt']['convolution']['value'])
28 convolution = eval(self.GetStringFromConfig('flatfilts', 'convfilt', 'convolution'))
30 xRet = plot.vectors[1][0]
31 yRet = plot.vectors[1][1]
32 convoluted = libpeakspot.conv_dx(yRet, convolution)
33 #convoluted=libpeakspot.conv_dx(yRet, [-20, -10, -6, 0, 12, 12, 12])
34 plot.add_set(xRet, convoluted)
35 #plot.vectors[1][1]=[i for i in convoluted]
36 #set contact point plot style to 'plot'
38 plot.styles.append('plot')
39 plot.colors.append('black')
40 #peak_location, peak_size = self.has_peaks(plot, blindwindow, convolution, minpeaks)
41 peak_locations, peak_sizes = self.has_peaks(plot, curve)
46 for location in peak_locations:
47 peak_locations_x.append(xRet[location])
48 peak_locations_y.append(yRet[location])
49 plot.add_set(peak_locations_x, peak_locations_y)
50 plot.styles.append('scatter')
51 plot.colors.append('green')
52 plot.add_set(peak_locations_x, peak_sizes)
53 plot.styles.append('scatter')
54 plot.colors.append('magenta')
56 #Return the plot object.