Skip to content

Commit 884c366

Browse files
authored
Add liquid_height to 96-head operations (#615)
1 parent 4745282 commit 884c366

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

pylabrobot/liquid_handling/backends/hamilton/STAR_backend.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2239,7 +2239,6 @@ async def aspirate96(
22392239
jet: bool = False,
22402240
blow_out: bool = False,
22412241
use_lld: bool = False,
2242-
liquid_height: float = 0,
22432242
air_transport_retract_dist: float = 10,
22442243
hlc: Optional[HamiltonLiquidClass] = None,
22452244
aspiration_type: int = 0,
@@ -2277,7 +2276,6 @@ async def aspirate96(
22772276
automatically.
22782277
22792278
use_lld: If True, use gamma liquid level detection. If False, use liquid height.
2280-
liquid_height: The height of the liquid above the bottom of the well, in millimeters.
22812279
air_transport_retract_dist: The distance to retract after aspirating, in millimeters.
22822280
22832281
aspiration_type: The type of aspiration to perform. (0 = simple; 1 = sequence; 2 = cup emptied
@@ -2332,7 +2330,7 @@ async def aspirate96(
23322330

23332331
tip = aspiration.tips[0]
23342332

2335-
liquid_height = position.z + liquid_height
2333+
liquid_height = position.z + (aspiration.liquid_height or 0)
23362334

23372335
liquid_to_be_aspirated = Liquid.WATER
23382336
if len(aspiration.liquids[0]) > 0 and aspiration.liquids[0][0][0] is not None:
@@ -2430,7 +2428,6 @@ async def dispense96(
24302428
empty: bool = False,
24312429
blow_out: bool = False,
24322430
hlc: Optional[HamiltonLiquidClass] = None,
2433-
liquid_height: float = 0,
24342431
dispense_mode: Optional[int] = None,
24352432
air_transport_retract_dist=10,
24362433
use_lld: bool = False,
@@ -2462,7 +2459,6 @@ async def dispense96(
24622459
dispense: The Dispense command to execute.
24632460
jet: Whether to use jet dispense mode.
24642461
blow_out: Whether to blow out after dispensing.
2465-
liquid_height: The height of the liquid in the well, in mm. Used if LLD is not used.
24662462
dispense_mode: The dispense mode to use. 0 = Partial volume in jet mode 1 = Blow out in jet
24672463
mode 2 = Partial volume at surface 3 = Blow out at surface 4 = Empty tip at fix position.
24682464
If `None`, the mode will be determined based on the `jet`, `empty`, and `blow_out`
@@ -2518,7 +2514,7 @@ async def dispense96(
25182514
)
25192515
tip = dispense.tips[0]
25202516

2521-
liquid_height = position.z + liquid_height
2517+
liquid_height = position.z + (dispense.liquid_height or 0)
25222518

25232519
dispense_mode = _dispensing_mode_for_op(empty=empty, jet=jet, blow_out=blow_out)
25242520

pylabrobot/liquid_handling/liquid_handler.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,6 +1517,7 @@ async def aspirate96(
15171517
volume: float,
15181518
offset: Coordinate = Coordinate.zero(),
15191519
flow_rate: Optional[float] = None,
1520+
liquid_height: Optional[float] = None,
15201521
blow_out_air_volume: Optional[float] = None,
15211522
**backend_kwargs,
15221523
):
@@ -1535,6 +1536,8 @@ async def aspirate96(
15351536
the plate or container is defined to be. Defaults to Coordinate.zero().
15361537
flow_rate ([Optional[float]]): The flow rate to use when aspirating, in ul/s. If `None`, the
15371538
backend default will be used.
1539+
liquid_height ([Optional[float]]): The height of the liquid in the well wrt the bottom, in
1540+
mm. If `None`, the backend default will be used.
15381541
blow_out_air_volume ([Optional[float]]): The volume of air to aspirate after the liquid, in
15391542
ul. If `None`, the backend default will be used.
15401543
backend_kwargs: Additional keyword arguments for the backend, optional.
@@ -1546,6 +1549,7 @@ async def aspirate96(
15461549
volume=volume,
15471550
offset=offset,
15481551
flow_rate=flow_rate,
1552+
liquid_height=liquid_height,
15491553
blow_out_air_volume=blow_out_air_volume,
15501554
)
15511555

@@ -1597,7 +1601,7 @@ async def aspirate96(
15971601
offset=offset,
15981602
flow_rate=flow_rate,
15991603
tips=tips,
1600-
liquid_height=None,
1604+
liquid_height=liquid_height,
16011605
blow_out_air_volume=blow_out_air_volume,
16021606
liquids=cast(List[List[Tuple[Optional[Liquid], float]]], all_liquids), # stupid
16031607
)
@@ -1640,7 +1644,7 @@ async def aspirate96(
16401644
offset=offset,
16411645
flow_rate=flow_rate,
16421646
tips=tips,
1643-
liquid_height=None,
1647+
liquid_height=liquid_height,
16441648
blow_out_air_volume=blow_out_air_volume,
16451649
liquids=cast(List[List[Tuple[Optional[Liquid], float]]], all_liquids), # stupid
16461650
)
@@ -1665,6 +1669,7 @@ async def dispense96(
16651669
volume: float,
16661670
offset: Coordinate = Coordinate.zero(),
16671671
flow_rate: Optional[float] = None,
1672+
liquid_height: Optional[float] = None,
16681673
blow_out_air_volume: Optional[float] = None,
16691674
**backend_kwargs,
16701675
):
@@ -1682,6 +1687,8 @@ async def dispense96(
16821687
the plate or container is defined to be. Defaults to Coordinate.zero().
16831688
flow_rate ([Optional[float]]): The flow rate to use when dispensing, in ul/s. If `None`, the
16841689
backend default will be used.
1690+
liquid_height ([Optional[float]]): The height of the liquid in the well wrt the bottom, in
1691+
mm. If `None`, the backend default will be used.
16851692
blow_out_air_volume ([Optional[float]]): The volume of air to dispense after the liquid, in
16861693
ul. If `None`, the backend default will be used.
16871694
backend_kwargs: Additional keyword arguments for the backend, optional.
@@ -1693,6 +1700,7 @@ async def dispense96(
16931700
volume=volume,
16941701
offset=offset,
16951702
flow_rate=flow_rate,
1703+
liquid_height=liquid_height,
16961704
blow_out_air_volume=blow_out_air_volume,
16971705
)
16981706

@@ -1744,7 +1752,7 @@ async def dispense96(
17441752
offset=offset,
17451753
flow_rate=flow_rate,
17461754
tips=tips,
1747-
liquid_height=None,
1755+
liquid_height=liquid_height,
17481756
blow_out_air_volume=blow_out_air_volume,
17491757
liquids=cast(List[List[Tuple[Optional[Liquid], float]]], all_liquids), # stupid
17501758
)
@@ -1784,7 +1792,7 @@ async def dispense96(
17841792
offset=offset,
17851793
flow_rate=flow_rate,
17861794
tips=tips,
1787-
liquid_height=None,
1795+
liquid_height=liquid_height,
17881796
blow_out_air_volume=blow_out_air_volume,
17891797
liquids=all_liquids,
17901798
)

0 commit comments

Comments
 (0)