@@ -1254,16 +1254,20 @@ def consolidate_liquid( # noqa: C901
1254
1254
)
1255
1255
# TODO BOILER PLATE ABOVE
1256
1256
1257
+ max_volume = min (
1258
+ self .get_max_volume (),
1259
+ self ._engine_client .state .geometry .get_nominal_tip_geometry (
1260
+ pipette_id = self .pipette_id ,
1261
+ labware_id = tip_racks [0 ][1 ].labware_id ,
1262
+ well_name = None ,
1263
+ ).volume ,
1264
+ )
1265
+
1257
1266
# TODO: add multi-channel pipette handling here
1258
1267
source_per_volume_step = tx_commons .expand_for_volume_constraints (
1259
1268
volumes = [volume for _ in range (len (source ))],
1260
1269
targets = source ,
1261
- max_volume = min (
1262
- self .get_max_volume (),
1263
- tip_racks [0 ][1 ]
1264
- .get_well_core ("A1" )
1265
- .get_max_volume (), # Assuming all tips in tiprack are of same volume
1266
- ),
1270
+ max_volume = max_volume ,
1267
1271
)
1268
1272
1269
1273
# TODO BOILERPLATE BELOW
@@ -1320,23 +1324,32 @@ def _pick_up_tip() -> None:
1320
1324
air_gap = 0 ,
1321
1325
)
1322
1326
]
1323
- air_gap_volume = (
1324
- transfer_props .aspirate .retract .air_gap_by_volume .get_for_volume (volume )
1325
- )
1326
1327
next_step_volume , next_source = next (source_per_volume_step )
1327
1328
is_last_step = False
1328
1329
while not is_last_step :
1329
1330
total_dispense_volume = 0.0
1331
+ air_gap_volume = (
1332
+ transfer_props .aspirate .retract .air_gap_by_volume .get_for_volume (
1333
+ next_step_volume
1334
+ )
1335
+ )
1330
1336
vol_aspirate_combo = []
1331
1337
# Take air gap into account because there will be a final air gap before the dispense
1332
- while total_dispense_volume + air_gap_volume < self .get_max_volume ():
1338
+ while (
1339
+ total_dispense_volume + next_step_volume + air_gap_volume <= max_volume
1340
+ ):
1333
1341
total_dispense_volume += next_step_volume
1334
1342
vol_aspirate_combo .append ((next_step_volume , next_source ))
1335
1343
try :
1336
1344
next_step_volume , next_source = next (source_per_volume_step )
1337
1345
except StopIteration :
1338
1346
is_last_step = True
1339
1347
break
1348
+ air_gap_volume = (
1349
+ transfer_props .aspirate .retract .air_gap_by_volume .get_for_volume (
1350
+ total_dispense_volume + next_step_volume
1351
+ )
1352
+ )
1340
1353
1341
1354
if new_tip == TransferTipPolicyV2 .ALWAYS :
1342
1355
if prev_src is not None :
@@ -1369,8 +1382,8 @@ def _pick_up_tip() -> None:
1369
1382
trash_location = trash_location ,
1370
1383
)
1371
1384
prev_src = next_source
1372
- if new_tip != TransferTipPolicyV2 .NEVER :
1373
- _drop_tip ()
1385
+ if new_tip != TransferTipPolicyV2 .NEVER :
1386
+ _drop_tip ()
1374
1387
1375
1388
def _get_location_and_well_core_from_next_tip_info (
1376
1389
self ,
0 commit comments