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

andorsdk2 now sets temperature on startup if value is given #92

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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: 5 additions & 3 deletions pylablib/devices/Andor/AndorSDK2.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,18 @@ def __init__(self, idx=0, ini_path="", temperature=None, fan_mode="off", amp_mod
self._add_settings_variable("frame_period",self.get_frame_period,self.set_frame_period)

def _initial_setup_temperature(self):
enable_cooler=True
if self._start_temperature=="off":
trng=self.get_temperature_range()
self.set_temperature(trng[1] if trng else 0,enable_cooler=False)
if self._start_temperature is None:
self._start_temperature=trng[1] if trng else 0
enable_cooler=False
elif self._start_temperature is None:
trng=self.get_temperature_range()
if trng:
self._start_temperature=trng[0]+int((trng[1]-trng[0])*0.2)
else:
self._start_temperature=0
self.set_temperature(self._start_temperature,enable_cooler=True)
self.set_temperature(self._start_temperature, enable_cooler=enable_cooler)
def _initial_setup_ext_trigger(self):
try:
lrng=self.get_trigger_level_limits()
Expand Down