aboutsummaryrefslogtreecommitdiff
path: root/eitControl.py
diff options
context:
space:
mode:
Diffstat (limited to 'eitControl.py')
-rw-r--r--eitControl.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/eitControl.py b/eitControl.py
index d1a967b..e2a1188 100644
--- a/eitControl.py
+++ b/eitControl.py
@@ -46,17 +46,11 @@ class Experiment:
self.xlabel=''
self.channelGraph={}
self.clearData()
- self.guiSetup(root)
- self.guiSweeper = Sweeper(self.root, Npoints=10, SweepTime=1, onTicCallbacks=[self.updatePlot])
self.hardware = {}
- self.sweeper = Sweeper(self.root, Npoints=500, SweepTime=10, onTicCallbacks=[self.onTic])
- self.funcGen = TriangleGen(0, 5, sweeper = self.sweeper)
- self.fCent = fCent = 6.83468e9
- self.fSpan = fSpan = 100e3
- self.rfGenFunc = RampGen(fCent-fSpan/2, fCent+fSpan/2, sweeper = self.sweeper)
self.hardwareSetup(args)
# now we ready to do gui
+ self.guiSweeper = Sweeper(self.root, Npoints=10, SweepTime=1, onTicCallbacks=[self.updatePlot])
self.guiSetup(root)
self.guiSweeper.cmdStart()
@@ -64,9 +58,11 @@ class Experiment:
def hardwareSetup(self,args):
if args.test:
print("Test mode, run with fake hardware")
+ self.sweeper = Sweeper(self.root, Npoints=100, SweepTime=1, onTicCallbacks=[self.onTic])
self.hardware['LabJack'] = ue9qol.UE9qolDummy(sweeper=self.sweeper)
self.hardware['rfGen'] = rfGen.rfGenLMX2487Dummy(port='/dev/ttyUSB0', speed=115200, timeout=1)
else:
+ self.sweeper = Sweeper(self.root, Npoints=500, SweepTime=10, onTicCallbacks=[self.onTic])
self.hardware['LabJack'] = ue9qol.UE9qol()
if platform.system() == 'Linux':
rf=rfGen.rfGenLMX2487(port='/dev/ttyUSB0', speed=115200, timeout=1)
@@ -74,6 +70,12 @@ class Experiment:
rf=rfGen.rfGenLMX2487(port='COM5', speed=115200, timeout=1)
self.hardware['rfGen'] = rf
+ self.fCent = fCent = 6.83468e9
+ self.fSpan = fSpan = 100e3
+ self.rfGenFunc = RampGen(fCent-fSpan/2, fCent+fSpan/2, sweeper = self.sweeper)
+
+ self.funcGen = TriangleGen(0, 5, sweeper = self.sweeper)
+
def guiSetup(self, root):
area = DockArea()
d1 = Dock("Controls", size=(5,1))