6 General utilities for TCCD stuff
9 class generaltccdCommands:
11 def plotmanip_threshold(self, plot, current, customvalue=False):
13 Cuts from the plot everything below the threshold.
14 Set the threshold with "set tccd_threshold"
17 if current.curve.experiment != 'smfluo':
20 if not self.config['tccd_threshold'] and (not customvalue):
26 thresh=self.config['tccd_threshold']
28 for set in plot.vectors:
31 if abs(value) < thresh:
41 def plotmanip_coincident(self,plot,current, customvalue=False):
43 Shows only coincident events
45 if current.curve.experiment != 'smfluo':
48 if not self.config['tccd_coincident'] and (not customvalue):
53 for index in range(len(plot.vectors[0][1])):
54 if abs(plot.vectors[0][1][index])>self.config['tccd_threshold'] and abs(plot.vectors[1][1][index])>self.config['tccd_threshold']:
55 newred.append(plot.vectors[0][1][index])
56 newblue.append(plot.vectors[1][1][index])
61 plot.vectors[0][1]=newred
62 plot.vectors[1][1]=newblue