added tool for capstop calibration
All checks were successful
CI for csaxs_bec / test (pull_request) Successful in 1m58s
CI for csaxs_bec / test (push) Successful in 1m58s

This commit was merged in pull request #159.
This commit is contained in:
x01dc
2026-03-11 13:30:39 +01:00
committed by wyzula-jan
parent 0a01dd4e36
commit 0ebaa3a42f

View File

@@ -27,6 +27,7 @@ if builtins.__dict__.get("bec") is not None:
bec = builtins.__dict__.get("bec")
dev = builtins.__dict__.get("dev")
umv = builtins.__dict__.get("umv")
mv = builtins.__dict__.get("mv")
umvr = builtins.__dict__.get("umvr")
@@ -908,4 +909,41 @@ class LamNI(LamNIOpticsMixin, LamniGuiTools):
msg.add_file(logo_path).add_text("".join(content).replace("\n", "</p><p>")).add_tag(
["BEC", "tomo_parameters", f"dataset_id_{dataset_id}", "LamNI", self.sample_name]
)
self.client.logbook.send_logbook_message(msg)
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")