4 General utilities for TCCD stuff
7 class generaltccdCommands(object):
9 def plotmanip_threshold(self, plot, current, customvalue=False):
11 Cuts from the plot everything below the threshold.
12 Set the threshold with "set tccd_threshold"
15 if current.curve.experiment != 'smfluo':
18 if not self.config['tccd_threshold'] and (not customvalue):
24 thresh=self.config['tccd_threshold']
26 for set in plot.vectors:
29 if abs(value) < thresh:
39 def plotmanip_coincident(self,plot,current, customvalue=False):
41 Shows only coincident events
43 if current.curve.experiment != 'smfluo':
46 if not self.config['tccd_coincident'] and (not customvalue):
51 for index in range(len(plot.vectors[0][1])):
52 if abs(plot.vectors[0][1][index])>self.config['tccd_threshold'] and abs(plot.vectors[1][1][index])>self.config['tccd_threshold']:
53 newred.append(plot.vectors[0][1][index])
54 newblue.append(plot.vectors[1][1][index])
59 plot.vectors[0][1]=newred
60 plot.vectors[1][1]=newblue