b_rotation functionality finished

TODO: sweep_b_angle and logging in b_rotation
This commit is contained in:
ryantan 2025-04-15 14:51:09 +02:00
parent 67c564188c
commit bcf86c4d70
2 changed files with 11 additions and 2 deletions

View File

@ -967,6 +967,14 @@ def b_field_rotation(instr1:pyvisa.resources.Resource, instr2:pyvisa.resources.R
# call the helper function to carry out the rotation/measurement of spectrum
monitor_devices(device_target_values, angles, intensity_data)
# TODO: implement b_sweep at an arbitrary angle in the Bx-By plane
# copy the functionality of loading the powerboxsupplies from b_rotation and the other sweep functionalities of
# b_sweep_val and implement it in this function
def sweep_b_angle(instr1:pyvisa.resources.Resource, instr2:pyvisa.resources.Resource,
min_bval:float, max_bval:float, res:float,
Settings:str, clockwise=True, base_file_name='', zerowhenfin_bool=False):
pass
################################################################# END OF FUNCTION DEFS ###########################################################################################

View File

@ -37,8 +37,9 @@ def device_thread(device_id):
print(f"Device {device_id} => {my_val} | Device {other_id} => {other_val}")
if not is_within_tolerance(my_val, other_val):
print(f"Device {device_id} is out of tolerance! Pausing...")
device_events[device_id].clear()
# print(f"Device {device_id} is out of tolerance! Pausing...")
# device_events[device_id].clear()
print("Not within tolerance!")
time.sleep(0.1) # Faster check interval