Commit fe18b573 authored by Martin Drechsler's avatar Martin Drechsler

option for loading only electrode voltage values added

parent 21b72ab7
......@@ -107,21 +107,21 @@ class GuiMainWindow(QMainWindow):
############ creating the controls ########################
self.piezoA397 = anal_control_signal('piezoA397', 13, out_minimum=0, out_maximum=4, out_step=0.01)
self.piezoB397 = anal_control_signal('piezoB397', 7, out_step = 0.01)
self.piezoA866 = anal_control_signal('piezoA866', 14, out_minimum=0, out_maximum=4, out_step=0.01)
self.piezoB866 = anal_control_signal('piezoB866', 9, out_step = 0.01, out_minimum= -2, out_maximum= 10)
self.piezoA423 = anal_control_signal('piezoA423', 8, out_step = 0.01)
self.piezoA397 = anal_control_signal('piezoA397', 13, ao_type ='cavity_piezo' , out_minimum=0, out_maximum=4, out_step=0.01)
self.piezoB397 = anal_control_signal('piezoB397', 7, ao_type ='cavity_piezo', out_step = 0.01)
self.piezoA866 = anal_control_signal('piezoA866', 14, ao_type ='cavity_piezo', out_minimum=0, out_maximum=4, out_step=0.01)
self.piezoB866 = anal_control_signal('piezoB866', 9, ao_type ='cavity_piezo', out_step = 0.01, out_minimum= -2, out_maximum= 10)
self.piezoA423 = anal_control_signal('piezoA423', 8, ao_type ='laser_piezo', out_step = 0.01)
self.trapDCA = anal_control_signal('DC A', 2)
self.trapDCB = anal_control_signal('DC B', 1)
self.trapCompC = anal_control_signal('Comp C', 4)
self.trapDCA = anal_control_signal('DC A', 2, ao_type ='electrode')
self.trapDCB = anal_control_signal('DC B', 1, ao_type ='electrode')
self.trapCompC = anal_control_signal('Comp C', 4, ao_type ='electrode')
self.trapCompC.sb.setEnabled(False)
self.trapCompD = anal_control_signal('Comp D', 5)
self.trapCompOven = anal_control_signal('Comp Oven', 0)
self.trapCompExYb = anal_control_signal('Comp Ex Yb', 6)
self.trapCompD = anal_control_signal('Comp D', 5, ao_type ='electrode')
self.trapCompOven = anal_control_signal('Comp Oven', 0, ao_type ='electrode')
self.trapCompExYb = anal_control_signal('Comp Ex Yb', 6, ao_type ='electrode')
......
......@@ -42,6 +42,7 @@ class myToolbarMenu(QWidget):
loadAct = QAction('Load', win)
saveAsAct = QAction('Save as' , win)
openFromAct = QAction('open from', win)
loadElectrodesAct = QAction('Load electrodes', win)
win.statusBar()
menubar = win.menuBar()
......@@ -51,6 +52,8 @@ class myToolbarMenu(QWidget):
fileMenu.addAction(loadAct)
fileMenu.addAction(saveAsAct)
fileMenu.addAction(openFromAct)
fileMenu.addAction(loadElectrodesAct)
viewMenu = menubar.addMenu('Monitor')
......@@ -64,6 +67,7 @@ class myToolbarMenu(QWidget):
#☺saveAct.triggered.connect(lambda: self.save(analog_control_signals))
loadAct.triggered.connect(lambda: self.load(analog_control_signals))
loadElectrodesAct.triggered.connect(lambda: self.open_from([ao for ao in analog_control_signals if ao.ao_type == 'electrode'], win))
saveAsAct.triggered.connect(lambda: self.save_as(analog_control_signals, win))
openFromAct.triggered.connect(lambda: self.open_from(analog_control_signals, win))
viewWebcams.toggled.connect(lambda: self.putWebcams(viewWebcams.isChecked()) )
......
......@@ -22,13 +22,19 @@ import wav_coherent
class anal_control_signal(QWidget):
_registry = []
def __init__(self, name, channel, out_minimum = -10, out_maximum = 10, out_step = 0.1, feedfoward = False):
def __init__(self, name, channel, ao_type, out_minimum = -10, out_maximum = 10, out_step = 0.1, feedfoward = False):
super().__init__()
self._registry.append(self)
ao_types = ['cavity_piezo', 'electrode', 'laser_piezo']
if ao_type not in ao_types:
raise ValueError("Invalid ao type. Expected one of: %s" % ao_types)
self.name = name
self.ch = channel
self.ao_type = ao_type
self.is_feedwoward_enabled = feedfoward
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment