...
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
# Get sequence of focussing images and
|
||||
# compute the best focus value
|
||||
#
|
||||
# This variant uses Fatkhullin's AndorAPI2 library
|
||||
# to control Andor IXon Ultra EMCCD camera
|
||||
# The script uses TCP-socket Python API to control focus
|
||||
# of the SAO RAS Zeiss-1000 telescope
|
||||
#
|
||||
|
||||
|
||||
@@ -14,8 +18,6 @@ import numpy as np
|
||||
import subprocess as sp
|
||||
import socket
|
||||
|
||||
# --- FLI-hardware related (ROBOTEL variant)
|
||||
|
||||
|
||||
def set_focus(foc_val):
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
@@ -24,7 +26,7 @@ def set_focus(foc_val):
|
||||
sock.send("goto={:g}".format(foc_val))
|
||||
resp = sock.recv(20)
|
||||
|
||||
if resp != "OK":
|
||||
if resp != "OK\n":
|
||||
sock.close()
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user