diff --git a/labscript_devices/AndorSolis/andor_sdk/andor_utils.py b/labscript_devices/AndorSolis/andor_sdk/andor_utils.py index 4a0c5095..d385b359 100644 --- a/labscript_devices/AndorSolis/andor_sdk/andor_utils.py +++ b/labscript_devices/AndorSolis/andor_sdk/andor_utils.py @@ -14,6 +14,7 @@ class AndorCam(object): 'acquisition': 'single', 'emccd': False, 'emccd_gain': 50, + 'em_gain_mode': 0, 'preamp': False, 'preamp_gain': 1.0, 'exposure_time': 20 * ms, @@ -42,6 +43,8 @@ class AndorCam(object): 'cooldown': False, 'water_cooling': False, 'temperature': 20, + 'wait_until_cool': True, + 'wait_until_stable': True, } def __init__(self, name='andornymous'): @@ -128,7 +131,7 @@ def check_capabilities(self): rich_print(f" emgain_caps: {self.emgain_caps}", color='lightsteelblue') def enable_cooldown( - self, temperature_setpoint=20, water_cooling=False, wait_until_stable=False + self, temperature_setpoint=20, water_cooling=False, wait_until_stable=False, wait_until_cool=True, ): """ Calls all the functions relative to temperature control and stabilization. Enables cooling down, waits for stabilization @@ -162,12 +165,13 @@ def enable_cooldown( self.temperature, self.temperature_status = GetTemperatureF() # Wait until stable - if wait_until_stable: + if wait_until_cool: while 'TEMP_NOT_REACHED' in self.temperature_status: if self.chatty: print(f"Temperature not reached: T = {self.temperature}") time.sleep(thermal_timeout) self.temperature, self.temperature_status = GetTemperatureF() + if wait_until_stable: while 'TEMP_STABILIZED' not in self.temperature_status: if self.chatty: print(f"Temperature not stable: T = {self.temperature}") @@ -201,7 +205,7 @@ def enable_emccd(self, emccd_gain): """ Calls all the functions relative to the emccd gain control. """ - if not emccd_gain in self.emccd_gain_range: + if not (emccd_gain > self.emccd_gain_range[0] and emccd_gain