DAQ: Changed zoom settings before auto_center in measure, and added a random hex string to the sample_prefix to prevent data overwrite
This commit is contained in:
1 parent
c73ac8d880
commit
8146184fad
1 file changed
+11
-6
+11
-6
@@ -3,6 +3,7 @@ import time
|
||||
from datetime import datetime
|
||||
from math import ceil
|
||||
from typing import List, Tuple
|
||||
import secrets
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
@@ -796,23 +797,27 @@ class AareDAQ:
|
||||
if not self.__loop_center_sequence(sample.db_id):
|
||||
raise LoopCenteringFailed
|
||||
|
||||
self.zoom = 700
|
||||
self.zoom = 500
|
||||
time.sleep(0.5)
|
||||
|
||||
self.__auto_center(RasterGridRequest(
|
||||
exp_time_s=0.01,
|
||||
file_prefix=sample_prefix,
|
||||
hex_string = secrets.token_hex(3) # 3 bytes = 6 hex characters
|
||||
print(hex_string.upper())
|
||||
|
||||
if not self.__auto_center(RasterGridRequest(
|
||||
exp_time_s=0.05,
|
||||
file_prefix=sample_prefix + f"_{hex_string}",
|
||||
smargon= SmargonCoordinate(),
|
||||
n_x=1,
|
||||
n_y=1,
|
||||
dtz=110.0,
|
||||
grid_size_mm=Coordinate(x=geom.beam_size_mm.x * 0.8, y=geom.beam_size_mm.y * 0.8),
|
||||
omega_deg=0
|
||||
))
|
||||
)):
|
||||
raise LoopCenteringFailed
|
||||
|
||||
self.__rotation( RotationScanRequest(start_omega_deg=0,
|
||||
dtz=110.0,
|
||||
file_prefix=sample_prefix,
|
||||
file_prefix=sample_prefix + f"_{hex_string}",
|
||||
exp_time_s=0.003,
|
||||
incr_omega_deg=0.4,
|
||||
steps=900,))
|
||||
|
||||
Reference in new issue
Block a user