DAQ: __loop_center_sequence: now uses ml_loop_centre_box. If it does not find a target moves on
This commit is contained in:
+13
-4
@@ -829,13 +829,22 @@ class AareDAQ:
|
||||
gain = int(s.sam_cam_gain)
|
||||
self.save_screenshot_db(sample_id, f"pre_alc_{sample_id}_{angle}_{s.zoom_value:.0f}_{exp}_{gain}")
|
||||
self.__devs.aerotech.move(angle, wait=True)
|
||||
time.sleep(1)
|
||||
filename = None
|
||||
exp = int(s.sam_cam_exp * 1000)
|
||||
gain = int(s.sam_cam_gain)
|
||||
if sample_id is not None:
|
||||
filename = f"{sample_id}_{angle}_{s.zoom_value:.0f}_{exp}_{gain}"
|
||||
if not os.path.exists(f"{sample_id}_{s.zoom_value:.0f}"):
|
||||
os.mkdir(f"{sample_id}_{s.zoom_value:.0f}")
|
||||
if not os.path.exists(f"{sample_id}_{s.zoom_value:.0f}_negative"):
|
||||
os.mkdir(f"{sample_id}_{s.zoom_value:.0f}_negative")
|
||||
if angle > 0:
|
||||
filename = f"{sample_id}_{s.zoom_value:.0f}/{sample_id}_{angle}_{s.zoom_value:.0f}_{exp}_{gain}"
|
||||
else:
|
||||
filename = f"{sample_id}_{s.zoom_value:.0f}_negative/{sample_id}_{angle}_{s.zoom_value:.0f}_{exp}_{gain}"
|
||||
|
||||
self.__devs.smargon.target = self.__loop_center(s, filename)
|
||||
target = self.__ml_loop_centre_box(sample_id, filename)
|
||||
if target is None:
|
||||
continue
|
||||
self.__devs.smargon.target = target #self.__loop_center(s, filename, iteration=i)
|
||||
self.__devs.smargon.wait(60)
|
||||
print(sample_id)
|
||||
if sample_id is not None:
|
||||
|
||||
Reference in New Issue
Block a user