From cad7130a1e8872478a215e04ca786f3452d83b30 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Fri, 11 Jun 2021 23:10:36 -0400 Subject: a more universal data reset/clean up --- eitControl.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/eitControl.py b/eitControl.py index d62ec65..61441bf 100644 --- a/eitControl.py +++ b/eitControl.py @@ -24,6 +24,7 @@ class Experiment: def __init__(self, root): self.root = root self.tic = 0 + self.channelsNames2grab={'tic', 'x','rfFreq','dac0', 'dac1', 'adc0', 'adc1', 'adc2', 'adc3'} #self.channelsNames2plot={'dac0', 'dac1', 'adc0', 'adc1', 'adc2', 'adc3'} self.channelsNames2plot={'adc0'} self.xChannelName='rfFreq' # can be also 'tic' or any of above @@ -104,15 +105,8 @@ class Experiment: def clearData(self): self.data = {} - self.data['tic'] = [] - self.data['x'] = [] - self.data['dac0'] = [] - self.data['dac1'] = [] - self.data['adc0'] = [] - self.data['adc1'] = [] - self.data['adc2'] = [] - self.data['adc3'] = [] - self.data['rfFreq'] = [] + for ch in self.channelsNames2grab: + self.data[ch] = [] def stop(self): self.sweeper.cmdStop() -- cgit v1.2.3