pylabrobot.lib.liquid_handling.channel_positioning.compute_nonconsecutive_channel_offsets#
- pylabrobot.lib.liquid_handling.channel_positioning.compute_nonconsecutive_channel_offsets(container: Container, use_channels: List[int], channel_spacings: List[float]) List[Coordinate] | None#
Compute Y offsets for non-consecutive channel selections targeting one container.
Wraps
compute_channel_offsets: fills in phantom channels for gaps in the channel sequence (e.g. [0, 2, 5] → physical span 0..5), attempts to fit the full span, and falls back to splitting into consecutive sub-groups when it doesn’t fit.- Parameters:
container (Container) – The target container.
use_channels (List[int]) – Channel indices being used (e.g. [0, 2, 5]). Need not be consecutive — gaps are filled with phantom channels.
channel_spacings (List[float]) – Per-channel occupancy diameters in mm. Must have at least
max(use_channels) + 1entries.
- Returns:
List of Y offsets (one per entry in use_channels), or None if even a single pair of adjacent channels can’t fit in the container.
- Return type:
List[Coordinate] | None