Skip to content

Commit

Permalink
allow_nonzero_volume for lh.return_tips
Browse files Browse the repository at this point in the history
  • Loading branch information
rickwierenga committed Nov 20, 2024
1 parent 82322ac commit 8638e1c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions pylabrobot/liquid_handling/liquid_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,12 @@ async def drop_tips(
**backend_kwargs,
)

async def return_tips(self, use_channels: Optional[list[int]] = None, **backend_kwargs):
async def return_tips(
self,
use_channels: Optional[list[int]] = None,
allow_nonzero_volume: bool = False,
**backend_kwargs,
):
"""Return all tips that are currently picked up to their original place.
Examples:
Expand All @@ -601,6 +606,9 @@ async def return_tips(self, use_channels: Optional[list[int]] = None, **backend_
>>> await lh.return_tips()
Args:
use_channels: List of channels to use. Index from front to back. If `None`, all that have
tips will be used.
allow_nonzero_volume: If `True`, tips will be returned even if their volumes are not zero.
backend_kwargs: backend kwargs passed to `drop_tips`.
Raises:
Expand All @@ -623,7 +631,11 @@ async def return_tips(self, use_channels: Optional[list[int]] = None, **backend_
if len(tip_spots) == 0:
raise RuntimeError("No tips have been picked up.")

return await self.drop_tips(tip_spots=tip_spots, use_channels=channels, **backend_kwargs)
return await self.drop_tips(
tip_spots=tip_spots,
use_channels=channels,
allow_nonzero_volume=allow_nonzero_volume**backend_kwargs,
)

async def discard_tips(
self,
Expand All @@ -645,6 +657,7 @@ async def discard_tips(
Args:
use_channels: List of channels to use. Index from front to back. If `None`, all that have
tips will be used.
allow_nonzero_volume: If `True`, tips will be returned even if their volumes are not zero.
backend_kwargs: Additional keyword arguments for the backend, optional.
"""

Expand Down

0 comments on commit 8638e1c

Please sign in to comment.