From 8cfd7f0e15c1d606440d2ea9a4b95ef5f822379f Mon Sep 17 00:00:00 2001 From: Camillo Moschner Date: Fri, 30 Jan 2026 14:40:48 +0000 Subject: [PATCH 1/5] create clear tip presence commands --- .../backends/hamilton/STAR_backend.py | 42 +++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py index bb01a378df3..4d5a53a4679 100644 --- a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py +++ b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py @@ -6308,6 +6308,20 @@ async def request_tip_presence(self) -> List[int]: Returns: 0 = no tip, 1 = Tip in gripper (for each channel) """ + warnings.warn( # TODO: remove 2026-06 + "`request_tip_presence` is deprecated and will be " + "removed in 2026-06 use `channel_measure_tip_presence` instead.", + DeprecationWarning, + stacklevel=2, + ) + return await self.channels_measure_tip_presence() + + async def channels_measure_tip_presence(self) -> List[int]: + """Measure tip presence on all single channels using their sleeve sensors. + + Returns: + List of integers where 0 = no tip, 1 = Tip present (for each channel) + """ resp = await self.send_command(module="C0", command="RT", fmt="rt# (n)") return cast(List[int], resp.get("rt")) @@ -7634,14 +7648,36 @@ async def move_96head_to_coordinate( # -------------- 3.10.6 Query CoRe 96 Head -------------- async def request_tip_presence_in_core_96_head(self): - """Request Tip presence in CoRe 96 Head + """Deprecated - use `head96_request_tip_presence` instead. Returns: - qh: 0 = no tips, 1 = TipRack are picked up + dictionary with key qh: + qh: 0 = no tips, 1 = TipRack are picked up """ - + warnings.warn( # TODO: remove 2026-06 + "`request_tip_presence_in_core_96_head` is deprecated and will be " + "removed in 2026-06 use `head96_request_tip_presence` instead.", + DeprecationWarning, + stacklevel=2, + ) + return await self.send_command(module="C0", command="QH", fmt="qh#") + async def head96_request_tip_presence(self) -> int: + """Request Tip presence on the 96-Head + + Note: this command requests this information from the STAR(let)'s + internal memory. + It does not directly sense whether tips are present. + + Returns: + 0 = no tips + 1 = TipRack are picked up + """ + resp = await self.send_command(module="C0", command="QH", fmt="qh#") + + return int(resp["qh"]) + async def request_position_of_core_96_head(self): """Deprecated - use `head96_request_position` instead.""" From 6eaf5544d88fa3334ae7b99a1b3b962161fde215 Mon Sep 17 00:00:00 2001 From: Camillo Moschner Date: Fri, 30 Jan 2026 14:42:03 +0000 Subject: [PATCH 2/5] `make format` --- .../liquid_handling/backends/hamilton/STAR_backend.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py index 4d5a53a4679..6806a0d2b8a 100644 --- a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py +++ b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py @@ -6314,8 +6314,8 @@ async def request_tip_presence(self) -> List[int]: DeprecationWarning, stacklevel=2, ) - return await self.channels_measure_tip_presence() - + return await self.channels_measure_tip_presence() + async def channels_measure_tip_presence(self) -> List[int]: """Measure tip presence on all single channels using their sleeve sensors. @@ -7660,7 +7660,7 @@ async def request_tip_presence_in_core_96_head(self): DeprecationWarning, stacklevel=2, ) - + return await self.send_command(module="C0", command="QH", fmt="qh#") async def head96_request_tip_presence(self) -> int: @@ -7675,9 +7675,9 @@ async def head96_request_tip_presence(self) -> int: 1 = TipRack are picked up """ resp = await self.send_command(module="C0", command="QH", fmt="qh#") - + return int(resp["qh"]) - + async def request_position_of_core_96_head(self): """Deprecated - use `head96_request_position` instead.""" From 0893585b62c3e6623b1ba2f53a52155d6f1bd3ab Mon Sep 17 00:00:00 2001 From: Camillo Moschner Date: Fri, 30 Jan 2026 19:12:53 +0000 Subject: [PATCH 3/5] update to `channels_sense_tip_presence` --- .../liquid_handling/backends/hamilton/STAR_backend.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py index 6806a0d2b8a..e655575b398 100644 --- a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py +++ b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py @@ -6310,13 +6310,13 @@ async def request_tip_presence(self) -> List[int]: """ warnings.warn( # TODO: remove 2026-06 "`request_tip_presence` is deprecated and will be " - "removed in 2026-06 use `channel_measure_tip_presence` instead.", + "removed in 2026-06 use `channels_sense_tip_presence` instead.", DeprecationWarning, stacklevel=2, ) - return await self.channels_measure_tip_presence() + return await self.channels_sense_tip_presence() - async def channels_measure_tip_presence(self) -> List[int]: + async def channels_sense_tip_presence(self) -> List[int]: """Measure tip presence on all single channels using their sleeve sensors. Returns: From 75ddf0f85b683a4d46a853b4c427f6f95b51a21a Mon Sep 17 00:00:00 2001 From: Camillo Moschner <122165124+BioCam@users.noreply.github.com> Date: Fri, 30 Jan 2026 22:58:18 +0000 Subject: [PATCH 4/5] Update pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py index e655575b398..29207226fb0 100644 --- a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py +++ b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py @@ -6320,7 +6320,7 @@ async def channels_sense_tip_presence(self) -> List[int]: """Measure tip presence on all single channels using their sleeve sensors. Returns: - List of integers where 0 = no tip, 1 = Tip present (for each channel) + List of integers where 0 = no tip, 1 = tip present (for each channel) """ resp = await self.send_command(module="C0", command="RT", fmt="rt# (n)") From 849b48c533ecb0f16bb8939cc30074fa4dbd3a05 Mon Sep 17 00:00:00 2001 From: Camillo Moschner Date: Fri, 30 Jan 2026 23:00:56 +0000 Subject: [PATCH 5/5] grammar --- pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py index 29207226fb0..23bc6624544 100644 --- a/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py +++ b/pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py @@ -7652,7 +7652,7 @@ async def request_tip_presence_in_core_96_head(self): Returns: dictionary with key qh: - qh: 0 = no tips, 1 = TipRack are picked up + qh: 0 = no tips, 1 = tips are picked up """ warnings.warn( # TODO: remove 2026-06 "`request_tip_presence_in_core_96_head` is deprecated and will be " @@ -7672,7 +7672,7 @@ async def head96_request_tip_presence(self) -> int: Returns: 0 = no tips - 1 = TipRack are picked up + 1 = firmware believes tips are on the 96-head """ resp = await self.send_command(module="C0", command="QH", fmt="qh#")