pylabrobot.revvity.celigo.Celigo.execute#
- async Celigo.execute(plan: ScanPlan, *, on_frame: Callable[[FrameResult], Awaitable[None]] | None = None, initial_brightfield_z_mm: float | None = None) ScanResult#
Execute a compiled scan plan, optionally reporting each completed frame.
- Parameters:
plan (ScanPlan) – Plan compiled for the current instrument configuration.
on_frame (Callable[[FrameResult], Awaitable[None]] | None) – Async callback awaited after each acquisition and illumination cleanup, before the next frame or stage move. Exceptions and cancellation propagate to the caller and stop execution of the remaining plan.
initial_brightfield_z_mm (float | None) – Brightfield focus seed in millimeters for each block, with channel offsets applied. None uses calibrated focus. When autofocus is requested, its result sets the focus for subsequent frames in that block.
- Returns:
All acquired frames and elapsed execution time, including time in callbacks. Frames are retained in memory even when on_frame is provided.
- Raises:
TypeError – plan is not a ScanPlan.
ValueError – The plan does not match the configuration or references an unknown block.
- Return type:
ScanResult