From 0ebaa3a42fe075706e36204f8580e12d340c58e1 Mon Sep 17 00:00:00 2001
From: x01dc
")).add_tag( ["BEC", "tomo_parameters", f"dataset_id_{dataset_id}", "LamNI", self.sample_name] ) - self.client.logbook.send_logbook_message(msg) \ No newline at end of file + self.client.logbook.send_logbook_message(msg) + + + def get_calibration_of_capstops_left_and_right(self): + import time + print(""" + Manual on how to center the Piezo stage first. + To obtain the center voltages one can move in closed loop to the interferometer + vertically and observe the capacitive readback signal. Check the limits of the + travel, move to center and obtain the required centering voltage. + Example: At 0 deg, accessible rty -60 to 51. So the init was 5 microns off. + Then this routine here will provide data for the new capstop left and right. + """) + + angle = 0 + umv(dev.lsamrot,0) + print("Capstop right\nAngle, Voltage1, Voltage2") + mv(dev.lsamrot,361) + while angle <= 360: + angle = dev.lsamrot.readback.get() + voltage1=float(dev.lsamrot.controller.socket_put_and_receive("MG@AN[1]")) + voltage2=float(dev.lsamrot.controller.socket_put_and_receive("MG@AN[2]")) + if angle<360: + print(f"{angle},{voltage1},{voltage2}") + time.sleep(.3) + + time.sleep(10) + print("\nCapstop left\nAngle, Voltage1, Voltage2") + mv(dev.lsamrot,-1) + while angle > 0: + angle = dev.lsamrot.readback.get() + voltage1=float(dev.lsamrot.controller.socket_put_and_receive("MG@AN[1]")) + voltage2=float(dev.lsamrot.controller.socket_put_and_receive("MG@AN[2]")) + if angle>0: + print(f"{angle},{voltage1},{voltage2}") + time.sleep(.3) + + print("Finished") \ No newline at end of file