feat: use configured param for min exp time

This commit is contained in:
2026-07-14 11:26:38 +02:00
parent c267da5ec0
commit bd09f02bda
2 changed files with 5 additions and 5 deletions
+5 -4
View File
@@ -7,7 +7,7 @@ from math import ceil
from pathlib import Path
from typing import Callable, List, Optional, Tuple
from aarecommon.config.beamline import cfg_get
from aarecommon.config.beamline import cfg_get, minimum_exp_time_s
from aarecommon.config.logger import setup_logger
from aarecommon.config.logger_events import (
log_timing,
@@ -1398,9 +1398,10 @@ class AareDAQ:
Returns:
CompletedRotationScan result or None if failed
"""
if rotation_request.exp_time_s < 0.004:
logger.warning("Exposure time too short for PXII rotation scan")
rotation_request.exp_time_s = 0.004
min_exp_time = minimum_exp_time_s() or 0.004
if rotation_request.exp_time_s < min_exp_time:
logger.warning(f"Exposure shorter than default of {min_exp_time} s! Adjusting.")
rotation_request.exp_time_s = min_exp_time
try:
return self._create_rotation_service().run(rotation_request)
except JFJochCommunicationError as e:
@@ -25,7 +25,6 @@ class RotationService:
def _execute_scan(self, request: RotationScanRequest) -> CompletedRotationScan:
omega_start = self.ctx.deps.devs.aerotech_omega
total_time = request.exp_time_s * request.steps
sample = self.ctx.sample