pylabrobot.liquid_handling.backends.hamilton.STAR_backend.STAR.execute_batched#

async STAR.execute_batched(func: Callable[[ChannelBatch], Awaitable[T]], batches: List[ChannelBatch], min_traverse_height_during_command: float | None = None) List[T]#

Execute a Z-axis callback across pre-planned batches with X/Y positioning.

Handles inter-batch safety: raises channels between batches, moves X when the X group changes, and positions Y before calling func. On error or KeyboardInterrupt, channels are moved to Z safety before re-raising.

Parameters:
  • func (Callable[[ChannelBatch], Awaitable[T]]) – Async callback that receives a ChannelBatch and performs Z-axis work (e.g. liquid level detection, z-touch probing). Must not move X or Y.

  • batches (List[ChannelBatch]) – Pre-planned batches from plan_batches().

  • min_traverse_height_during_command (float | None) – Absolute Z height (mm) for inter-batch channel raises. None uses full Z safety.

Returns:

List of results from each batch callback, in batch order.

Return type:

List[T]