Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions pylabrobot/liquid_handling/liquid_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1754,9 +1754,10 @@ async def aspirate96(
if tip is None:
continue

if not container.tracker.is_disabled and does_volume_tracking():
container.tracker.remove_liquid(volume=volume)
tip.tracker.add_liquid(volume=volume)
if does_volume_tracking():
if not container.tracker.is_disabled:
container.tracker.remove_liquid(volume=volume)
tip.tracker.add_liquid(volume=volume)

aspiration = MultiHeadAspirationContainer(
container=container,
Expand All @@ -1782,9 +1783,10 @@ async def aspirate96(
if tip is None:
continue

if not well.tracker.is_disabled and does_volume_tracking():
well.tracker.remove_liquid(volume=volume)
tip.tracker.add_liquid(volume=volume)
if does_volume_tracking():
if not well.tracker.is_disabled:
well.tracker.remove_liquid(volume=volume)
tip.tracker.add_liquid(volume=volume)

aspiration = MultiHeadAspirationPlate(
wells=cast(List[Well], containers),
Expand Down
10 changes: 10 additions & 0 deletions pylabrobot/liquid_handling/liquid_handler_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from pylabrobot.resources.revvity.plates import Revvity_384_wellplate_28ul_Ub
from pylabrobot.resources.utils import create_ordered_items_2d
from pylabrobot.resources.volume_tracker import (
no_volume_tracking,
set_volume_tracking,
)
from pylabrobot.resources.well import Well
Expand Down Expand Up @@ -533,6 +534,15 @@ async def test_default_offset_head96(self):
call_kwargs = self.backend.drop_tips96.call_args.kwargs
self.assertEqual(call_kwargs["drop"].offset, Coordinate(1, 3, 3))

async def test_aspirate96_tip_tracker_respects_volume_tracking_off(self):
"""With volume tracking off, aspirate96 leaves the 96-head tip trackers untouched, matching
single-channel aspirate (the global flag governs the tip side, not just the source)."""
await self.lh.pick_up_tips96(self.tip_rack)
tip = self.lh.head96[0].get_tip()
with no_volume_tracking():
await self.lh.aspirate96(self.plate, volume=10)
self.assertEqual(tip.tracker.get_used_volume(), 0)

async def test_default_offset_head96_initializer(self):
backend = _create_mock_backend(num_channels=8)
deck = STARLetDeck()
Expand Down
Loading