From a28c54718863983558be491987499a790e891bbc Mon Sep 17 00:00:00 2001 From: Eduardo Hirata Date: Mon, 13 Feb 2023 21:26:56 -0800 Subject: [PATCH 1/2] added option to parse through TS or DAC --- recOrder/plugin/main_widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recOrder/plugin/main_widget.py b/recOrder/plugin/main_widget.py index f885f154..53d02243 100644 --- a/recOrder/plugin/main_widget.py +++ b/recOrder/plugin/main_widget.py @@ -1340,7 +1340,7 @@ def enter_calib_mode(self): memory = set() for i in range(cfg.size()): prop = cfg.getSetting(i) - if "TS_DAC" in prop.getDeviceLabel(): + if "TS" in prop.getDeviceLabel() and "DAC" in prop.getDeviceLabel(): dac = prop.getDeviceLabel()[-2:] if dac not in memory: self.ui.cb_lca.addItem("DAC" + dac) From a73a48ecf76734db36f52a9c647c5feb24014e2b Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Mon, 31 Jul 2023 14:20:51 -0700 Subject: [PATCH 2/2] hardcoding the triggerscope varibles to match mantis --- recOrder/calib/Calibration.py | 8 ++++---- recOrder/plugin/main_widget.py | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/recOrder/calib/Calibration.py b/recOrder/calib/Calibration.py index d8f50fbb..43e05997 100644 --- a/recOrder/calib/Calibration.py +++ b/recOrder/calib/Calibration.py @@ -74,8 +74,8 @@ def __init__( "LCB": (LC_DEVICE_NAME, "Retardance LC-B [in waves]"), "LCA-Voltage": (LC_DEVICE_NAME, "Voltage (V) LC-A"), "LCB-Voltage": (LC_DEVICE_NAME, "Voltage (V) LC-B"), - "LCA-DAC": ("TS_DAC01", "Volts"), - "LCB-DAC": ("TS_DAC02", "Volts"), + "LCA-DAC": ("TS1_DAC01", "Volts"), + "LCB-DAC": ("TS1_DAC02", "Volts"), "State0": ( LC_DEVICE_NAME, "Pal. elem. 00; enter 0 to define; 1 to activate", @@ -182,8 +182,8 @@ def __init__( self._shutter_state = None def set_dacs(self, lca_dac, lcb_dac): - self.PROPERTIES["LCA-DAC"] = (f"TS_{lca_dac}", "Volts") - self.PROPERTIES["LCB-DAC"] = (f"TS_{lcb_dac}", "Volts") + self.PROPERTIES["LCA-DAC"] = (f"TS1_{lca_dac}", "Volts") + self.PROPERTIES["LCB-DAC"] = (f"TS1_{lcb_dac}", "Volts") def set_wavelength(self, wavelength): self.calib.set_wavelength(wavelength) diff --git a/recOrder/plugin/main_widget.py b/recOrder/plugin/main_widget.py index 52fba0ca..a378aadc 100644 --- a/recOrder/plugin/main_widget.py +++ b/recOrder/plugin/main_widget.py @@ -1378,16 +1378,17 @@ def enter_calib_mode(self): self.ui.cb_lcb.show() self.ui.label_lca.show() self.ui.label_lcb.show() - cfg = self.mmc.getConfigData(self.config_group, "State0") - # Update the DAC combo boxes with available DAC's from the config. Necessary for the user # to specify which DAC output corresponds to which LC for voltage-space calibration memory = set() for i in range(cfg.size()): prop = cfg.getSetting(i) + print(f'properties {str(prop.getDeviceLabel())}') if "TS" in prop.getDeviceLabel() and "DAC" in prop.getDeviceLabel(): dac = prop.getDeviceLabel()[-2:] + # print(f' device type {self.mmc.getDeviceType()}') + if dac not in memory: self.ui.cb_lca.addItem("DAC" + dac) self.ui.cb_lcb.addItem("DAC" + dac)