Fix triggering order
This commit is contained in:
@@ -554,6 +554,8 @@ class GigaFrostCamera(PSIDeviceBase, GigaFrostBase):
|
||||
d["image_height"] = scan_args["image_height"]
|
||||
if "exp_time" in scan_args and scan_args["exp_time"] is not None:
|
||||
d["exposure_time_ms"] = scan_args["exp_time"]
|
||||
if "exp_period" in scan_args and scan_args["exp_period"] is not None:
|
||||
d["exposure_period_ms"] = scan_args["exp_period"]
|
||||
if "acq_time" in scan_args and scan_args["acq_time"] is not None:
|
||||
d["exposure_time_ms"] = scan_args["acq_time"]
|
||||
if "acq_period" in scan_args and scan_args["acq_period"] is not None:
|
||||
@@ -588,14 +590,15 @@ class GigaFrostCamera(PSIDeviceBase, GigaFrostBase):
|
||||
|
||||
def on_pre_scan(self) -> DeviceStatus | None:
|
||||
"""Called right before the scan starts on all devices automatically."""
|
||||
# Switch to acquiring
|
||||
self.arm()
|
||||
# First start the stdDAQ
|
||||
if self.backend is not None:
|
||||
self.backend.start(
|
||||
file_path=self.file_path.get(),
|
||||
file_prefix=self.file_prefix.get(),
|
||||
num_images=self.num_images.get(),
|
||||
)
|
||||
# Then start the camera
|
||||
self.arm()
|
||||
|
||||
def on_trigger(self) -> DeviceStatus | None:
|
||||
"""Called when the device is triggered."""
|
||||
@@ -618,7 +621,7 @@ class GigaFrostCamera(PSIDeviceBase, GigaFrostBase):
|
||||
wait_time = 0.2 + 0.001 * self.num_exposures.value * max(
|
||||
self.acquire_time.value, self.acquire_period.value
|
||||
)
|
||||
logger.info(f"[{self.name}] Triggering blocks for {wait_time} seconds")
|
||||
logger.info(f"[{self.name}] Triggering set to block for {wait_time} seconds")
|
||||
return DeviceStatus(self, done=True, success=True, settle_time=wait_time)
|
||||
else:
|
||||
self.soft_trig.set(1).wait()
|
||||
|
||||
Reference in New Issue
Block a user