From ce913cfc8711af3faaf33607a9dddaf57ea4a012 Mon Sep 17 00:00:00 2001 From: x12sa Date: Wed, 16 Sep 2026 11:31:01 +0200 Subject: [PATCH] fix(flomni): make fovx=220 inclusive everywhere, default exp_time example to 0.1 - flomni_fermat_scan.py's fovx bound was lt=220 (exclusive), so 220 itself was rejected; change to le=220 to match flomni.py's fovx setter, which was already inclusive (only raises for val > 220). - tomo_params.py's flomni fov_fields spinbox max was still 200.0, an independent limit that wasn't updated when fovx's cap was raised elsewhere -- bring it to 220.0 for consistency. - exp_time's real default is now 0.1 instead of 0, so the generated scan doc's example (scans.flomni_fermat_scan?) shows a realistic exposure time instead of 0. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_0197yD3hTxwvrgmYr7aaYiCD --- csaxs_bec/bec_widgets/widgets/tomo_params/tomo_params.py | 2 +- csaxs_bec/scans/flomni_fermat_scan.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/csaxs_bec/bec_widgets/widgets/tomo_params/tomo_params.py b/csaxs_bec/bec_widgets/widgets/tomo_params/tomo_params.py index 0c6341c6..5b2d1cce 100644 --- a/csaxs_bec/bec_widgets/widgets/tomo_params/tomo_params.py +++ b/csaxs_bec/bec_widgets/widgets/tomo_params/tomo_params.py @@ -2267,7 +2267,7 @@ SETUP_PROFILES: dict[str, dict[str, Any]] = { "has_single_point": True, "has_zero_deg_reference": True, "fov_fields": [ - ("fovx", "FOV x (µm)", 0.1, 200.0, 2), + ("fovx", "FOV x (µm)", 0.1, 220.0, 2), ("fovy", "FOV y (µm)", 0.1, 100.0, 2), ], "stitch_fields": [("stitch_x", "Stitch x", 0, 50), ("stitch_y", "Stitch y", 0, 50)], diff --git a/csaxs_bec/scans/flomni_fermat_scan.py b/csaxs_bec/scans/flomni_fermat_scan.py index 0fd80dde..df31722f 100644 --- a/csaxs_bec/scans/flomni_fermat_scan.py +++ b/csaxs_bec/scans/flomni_fermat_scan.py @@ -70,7 +70,7 @@ class FlomniFermatScan(ScanBase): def __init__( # fmt: off self, - fovx: Annotated[float, ScanArgument(display_name="Fovx", description="FOV in the piezo plane (i.e. piezo range). Max 220 um.", units=Units.µm, gt=0, lt=220, example=10)], + fovx: Annotated[float, ScanArgument(display_name="Fovx", description="FOV in the piezo plane (i.e. piezo range). Max 220 um.", units=Units.µm, gt=0, le=220, example=10)], fovy: Annotated[float, ScanArgument(display_name="Fovy", description="FOV in the piezo plane (i.e. piezo range). Max 100 um.", units=Units.µm, gt=0, lt=100, example=10)], cenx: Annotated[float, ScanArgument(display_name="Cenx", description="Center position in x.", units=Units.µm, example=0)], ceny: Annotated[float, ScanArgument(display_name="Ceny", description="Center position in y.", units=Units.µm, example=0)], @@ -78,7 +78,7 @@ class FlomniFermatScan(ScanBase): zshift: Annotated[float, ScanArgument(display_name="Zshift", description="Shift in z. ", units=Units.µm, example=0)], angle: Annotated[float, ScanArgument(display_name="Angle", description="Rotation angle (will rotate first)", units=Units.deg, example=0)], corridor_size: Annotated[float | None, ScanArgument(display_name="Corridor Size", description="Corridor size for the corridor optimization.", units=Units.µm)] = None, - exp_time: DefaultArgType.ExposureTime = 0, + exp_time: DefaultArgType.ExposureTime = 0.1, frames_per_trigger: DefaultArgType.FramesPerTrigger = 1, burst_at_each_point: DefaultArgType.BurstAtEachPoint = 1, **kwargs,