From d74aa42aaa859f847a27017f20bfe609cf111f20 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Fri, 11 Jun 2021 23:07:10 -0400 Subject: better x axis shift with proper label --- eitControl.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'eitControl.py') diff --git a/eitControl.py b/eitControl.py index 5232435..d62ec65 100644 --- a/eitControl.py +++ b/eitControl.py @@ -27,7 +27,7 @@ class Experiment: #self.channelsNames2plot={'dac0', 'dac1', 'adc0', 'adc1', 'adc2', 'adc3'} self.channelsNames2plot={'adc0'} self.xChannelName='rfFreq' # can be also 'tic' or any of above - self.xlabel='Frequency (Hz)' + self.xlabel='' self.lines2plot={} self.clearData() self.guiSetup(root) @@ -187,7 +187,11 @@ class Experiment: # X-axis (i.e. independent variable) # self.data['x'].append(tic) - self.data['x']=self.data[self.xChannelName] + # self.data['x']=self.data[self.xChannelName] + x=self.data[self.xChannelName][-1] + x=(x-self.fCent)/1e3; # shift and convert to kHz + self.xlabel=f'Frequency offset (kHz) relative center {self.fCent/1e6} MHz ' + self.data['x'].append(x) stop = datetime.now() runTime = (stop-start).seconds + float((stop-start).microseconds)/1000000 -- cgit v1.2.3