From 85317d1483c2f453613060f3e53554dac41f9495 Mon Sep 17 00:00:00 2001 From: Camillo Moschner Date: Fri, 17 Apr 2026 10:59:53 +0100 Subject: [PATCH] Implement probe_liquid_heights in STARChatterboxBackend Reads each container's tracked volume and converts to height via compute_height_from_volume. Parameters matching the real-backend signature are accepted but have no effect in simulation. Will be upgraded in #949 (pipette batch scheduling refactor). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../backends/hamilton/STAR_chatterbox.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pylabrobot/liquid_handling/backends/hamilton/STAR_chatterbox.py b/pylabrobot/liquid_handling/backends/hamilton/STAR_chatterbox.py index fc642de8b33..8bd0f16da19 100644 --- a/pylabrobot/liquid_handling/backends/hamilton/STAR_chatterbox.py +++ b/pylabrobot/liquid_handling/backends/hamilton/STAR_chatterbox.py @@ -314,5 +314,22 @@ async def request_tip_len_on_channel(self, channel_idx: int) -> float: async def position_channels_in_y_direction(self, ys, make_space=True): print("positioning channels in y:", ys, "make_space:", make_space) + async def probe_liquid_heights( + self, + containers, + use_channels=None, + resource_offsets=None, + lld_mode=None, + search_speed=10.0, + n_replicates=1, + min_traverse_height_at_beginning_of_command=None, + min_traverse_height_during_command=None, + z_position_at_end_of_command=None, + move_to_z_safety_after=None, + ) -> List[float]: + """Return liquid heights from the volume tracker using each container's + height-from-volume function. No physical probing in simulation.""" + return [c.compute_height_from_volume(c.tracker.get_used_volume()) for c in containers] + async def request_pip_height_last_lld(self): return list(range(12))