fxes. working Zeiss-1000+EMCCD sequence

This commit is contained in:
2025-08-24 19:39:54 +03:00
parent cd49a9044f
commit 66c10e2f31
3 changed files with 26 additions and 6 deletions

View File

@@ -23,7 +23,8 @@ def set_focus(foc_val):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("ztcs.sao.ru", 4444))
sock.send("goto={:g}".format(foc_val))
print(foc_val)
sock.send("goto={:f}".format(foc_val))
resp = sock.recv(20)
if resp != "OK":
@@ -36,7 +37,7 @@ def set_focus(foc_val):
def get_image(filename, exp_time):
cmd = ["ixonultra_cmdclient", "-A", "CCD", "-T", "{:g}".format(exp_time), filename]
cmd = ["ixonultra_cmdclient", "-A", "CCD", "-p", "1", "--hs", "0", "-T", "{:g}".format(exp_time), filename]
ret = sp.run(cmd, stdout=sp.PIPE, stderr=sp.PIPE)
return ret.returncode
@@ -175,7 +176,7 @@ if __name__ == "__main__":
if args.verbose:
print("\tThe best focus value: {:g}".format(result["focus_value"]))
if not args.do_no_set:
if not args.do_not_set:
if args.verbose:
print("\n\tSet focus to the best value ...", end="")
set_focus(result["focus_value"])
@@ -185,3 +186,4 @@ if __name__ == "__main__":
print("DONE.")
sys.exit(0)