Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added option to parse through TS or DAC #318

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions recOrder/calib/Calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 4 additions & 3 deletions recOrder/plugin/main_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
if "TS_DAC" in prop.getDeviceLabel():
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)
Expand Down