4 SHOW CONVOLUTED CURVE PLUGIN FOR HOOKE
6 This plugin contains a plotmanipulator to show the convoluted curve.
7 (c) Dr. Rolf Schmidt, 2009
12 class showconvolutedCommands:
14 #def _plug_init(self):
17 def plotmanip_showconvoluted(self, plot, curve):
19 BEGIN: taken from procplots.py
20 might need some tweaking
22 #use only for force spectroscopy experiments!
23 if curve.driver.experiment != 'smfs':
27 END: taken from procplots.py
30 #need to convert the string that contains the list into a list
31 #convolution = eval(self.config['convfilt']['convolution']['value'])
32 convolution = eval(self.GetStringFromConfig('flatfilts', 'convfilt', 'convolution'))
34 xRet = plot.vectors[1][0]
35 yRet = plot.vectors[1][1]
36 convoluted = libpeakspot.conv_dx(yRet, convolution)
37 #convoluted=libpeakspot.conv_dx(yRet, [-20, -10, -6, 0, 12, 12, 12])
38 plot.add_set(xRet, convoluted)
39 #plot.vectors[1][1]=[i for i in convoluted]
40 #set contact point plot style to 'plot'
42 plot.styles.append('plot')
43 plot.colors.append('black')
44 #peak_location, peak_size = self.has_peaks(plot, blindwindow, convolution, minpeaks)
45 peak_locations, peak_sizes = self.has_peaks(plot, curve)
50 for location in peak_locations:
51 peak_locations_x.append(xRet[location])
52 peak_locations_y.append(yRet[location])
53 plot.add_set(peak_locations_x, peak_locations_y)
54 plot.styles.append('scatter')
55 plot.colors.append('green')
56 plot.add_set(peak_locations_x, peak_sizes)
57 plot.styles.append('scatter')
58 plot.colors.append('magenta')
60 #Return the plot object.