Skip to content

Commit dfe976a

Browse files
authored
Enable STAR 96head partial tiprack pickup/drop + Fix requirement for A1 to have a tip (#777)
1 parent 9b25f9e commit dfe976a

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,6 +2469,7 @@ async def pick_up_tips96(
24692469
tip_pickup_method: Literal["from_rack", "from_waste", "full_blowout"] = "from_rack",
24702470
minimum_height_command_end: Optional[float] = None,
24712471
minimum_traverse_height_at_beginning_of_a_command: Optional[float] = None,
2472+
experimental_alignment_tipspot_identifier: str = "A1",
24722473
):
24732474
"""Pick up tips using the 96 head.
24742475
@@ -2490,6 +2491,7 @@ async def pick_up_tips96(
24902491
tip_pickup_method: The method to use for picking up tips. One of "from_rack", "from_waste", "full_blowout".
24912492
minimum_height_command_end: The minimum height to move to at the end of the command.
24922493
minimum_traverse_height_at_beginning_of_a_command: The minimum height to move to at the beginning of the command.
2494+
experimental_alignment_tipspot_identifier: The tipspot to use for alignment with head's A1 channel. Defaults to "tipspot A1". allowed range is A1 to H12.
24932495
"""
24942496

24952497
if isinstance(tip_pickup_method, int):
@@ -2504,8 +2506,6 @@ async def pick_up_tips96(
25042506

25052507
assert self.core96_head_installed, "96 head must be installed"
25062508

2507-
tip_spot_a1 = pickup.resource.get_item("A1")
2508-
25092509
prototypical_tip = next((tip for tip in pickup.tips if tip is not None), None)
25102510
if prototypical_tip is None:
25112511
raise ValueError("No tips found in the tip rack.")
@@ -2518,19 +2518,21 @@ async def pick_up_tips96(
25182518
fitting_depth = prototypical_tip.fitting_depth
25192519
tip_engage_height_from_tipspot = tip_length - fitting_depth
25202520

2521-
# Tip size–based z-adjustment
2522-
h_tip = self._get_hamilton_tip([tip_spot_a1])
2523-
if h_tip.tip_size == TipSize.LOW_VOLUME:
2521+
# Adjust tip engage height based on tip size
2522+
if prototypical_tip.tip_size == TipSize.LOW_VOLUME:
25242523
tip_engage_height_from_tipspot += 2
2525-
elif h_tip.tip_size != TipSize.STANDARD_VOLUME:
2524+
elif prototypical_tip.tip_size != TipSize.STANDARD_VOLUME:
25262525
tip_engage_height_from_tipspot -= 2
25272526

25282527
# Compute pickup Z
2529-
tip_spot_z = tip_spot_a1.get_location_wrt(self.deck).z + pickup.offset.z
2528+
alignment_tipspot = pickup.resource.get_item(experimental_alignment_tipspot_identifier)
2529+
tip_spot_z = alignment_tipspot.get_location_wrt(self.deck).z + pickup.offset.z
25302530
z_pickup_position = tip_spot_z + tip_engage_height_from_tipspot
25312531

25322532
# Compute full position (used for x/y)
2533-
pickup_position = tip_spot_a1.get_location_wrt(self.deck) + tip_spot_a1.center() + pickup.offset
2533+
pickup_position = (
2534+
alignment_tipspot.get_location_wrt(self.deck) + alignment_tipspot.center() + pickup.offset
2535+
)
25342536
pickup_position.z = round(z_pickup_position, 2)
25352537

25362538
self._check_96_position_legal(pickup_position, skip_z=True)
@@ -2564,12 +2566,13 @@ async def drop_tips96(
25642566
drop: DropTipRack,
25652567
minimum_height_command_end: Optional[float] = None,
25662568
minimum_traverse_height_at_beginning_of_a_command: Optional[float] = None,
2569+
experimental_alignment_tipspot_identifier: str = "A1",
25672570
):
25682571
"""Drop tips from the 96 head."""
25692572
assert self.core96_head_installed, "96 head must be installed"
25702573

25712574
if isinstance(drop.resource, TipRack):
2572-
tip_spot_a1 = drop.resource.get_item("A1")
2575+
tip_spot_a1 = drop.resource.get_item(experimental_alignment_tipspot_identifier)
25732576
position = tip_spot_a1.get_location_wrt(self.deck) + tip_spot_a1.center() + drop.offset
25742577
tip_rack = tip_spot_a1.parent
25752578
assert tip_rack is not None

0 commit comments

Comments
 (0)