3 """General utilities for TCCD stuff
6 class generaltccdCommands(object):
8 def plotmanip_threshold(self, plot, current, customvalue=False):
10 Cuts from the plot everything below the threshold.
11 Set the threshold with "set tccd_threshold"
14 if current.curve.experiment != 'smfluo':
17 if not self.config['tccd_threshold'] and (not customvalue):
23 thresh=self.config['tccd_threshold']
25 for set in plot.vectors:
28 if abs(value) < thresh:
38 def plotmanip_coincident(self,plot,current, customvalue=False):
40 Shows only coincident events
42 if current.curve.experiment != 'smfluo':
45 if not self.config['tccd_coincident'] and (not customvalue):
50 for index in range(len(plot.vectors[0][1])):
51 if abs(plot.vectors[0][1][index])>self.config['tccd_threshold'] and abs(plot.vectors[1][1][index])>self.config['tccd_threshold']:
52 newred.append(plot.vectors[0][1][index])
53 newblue.append(plot.vectors[1][1][index])
58 plot.vectors[0][1]=newred
59 plot.vectors[1][1]=newblue