4
4
5
5
from pylabrobot .liquid_handling import LiquidHandler
6
6
from pylabrobot .liquid_handling .standard import Pickup , GripDirection
7
- from pylabrobot .liquid_handling .liquid_classes .hamilton .star import (
8
- StandardVolumeFilter_Water_DispenseSurface ,
9
- StandardVolumeFilter_Water_DispenseJet_Empty ,
10
- HighVolumeFilter_96COREHead1000ul_Water_DispenseSurface_Empty )
11
7
from pylabrobot .plate_reading import PlateReader
12
8
from pylabrobot .plate_reading .plate_reader_tests import MockPlateReaderBackend
13
9
from pylabrobot .resources import (
@@ -228,10 +224,6 @@ def __init__(self, name: str):
228
224
229
225
await self .lh .setup ()
230
226
231
- self .hlc = StandardVolumeFilter_Water_DispenseSurface .copy ()
232
- self .hlc .aspiration_air_transport_volume = 0
233
- self .hlc .dispense_air_transport_volume = 0
234
-
235
227
async def asyncTearDown (self ):
236
228
await self .lh .stop ()
237
229
@@ -378,9 +370,7 @@ async def test_aspirate56(self):
378
370
self .plate .lid .unassign ()
379
371
for well in self .plate .get_items (["A1" , "B1" ]):
380
372
well .tracker .set_liquids ([(None , 100 * 1.072 )]) # liquid class correction
381
- corrected_vol = self .hlc .compute_corrected_volume (100 )
382
- await self .lh .aspirate (self .plate ["A1" , "B1" ], vols = [corrected_vol , corrected_vol ],
383
- use_channels = [4 , 5 ], ** self .hlc .make_asp_kwargs (2 ))
373
+ await self .lh .aspirate (self .plate ["A1" , "B1" ], vols = [100 , 100 ], use_channels = [4 , 5 ])
384
374
self ._assert_command_sent_once ("C0ASid0004at0 0 0 0 0 0 0&tm0 0 0 0 1 1 0&xp00000 00000 00000 "
385
375
"00000 02983 02983 00000&yp0000 0000 0000 0000 1457 1367 0000&th2450te2450lp2000 2000 2000 "
386
376
"2000 2000 2000 2000&ch000 000 000 000 000 000 000&zl1866 1866 1866 1866 1866 1866 1866&"
@@ -404,8 +394,7 @@ async def test_single_channel_aspiration(self):
404
394
self .plate .lid .unassign ()
405
395
well = self .plate .get_item ("A1" )
406
396
well .tracker .set_liquids ([(None , 100 * 1.072 )]) # liquid class correction
407
- await self .lh .aspirate ([well ], vols = [self .hlc .compute_corrected_volume (100 )],
408
- ** self .hlc .make_asp_kwargs (1 ))
397
+ await self .lh .aspirate ([well ], vols = [100 ])
409
398
410
399
# This passes the test, but is not the real command.
411
400
self ._assert_command_sent_once (
@@ -424,8 +413,7 @@ async def test_single_channel_aspiration_liquid_height(self):
424
413
self .plate .lid .unassign ()
425
414
well = self .plate .get_item ("A1" )
426
415
well .tracker .set_liquids ([(None , 100 * 1.072 )]) # liquid class correction
427
- await self .lh .aspirate ([well ], vols = [self .hlc .compute_corrected_volume (100 )],
428
- liquid_height = [10 ], ** self .hlc .make_asp_kwargs (1 ))
416
+ await self .lh .aspirate ([well ], vols = [100 ], liquid_height = [10 ])
429
417
430
418
# This passes the test, but is not the real command.
431
419
self ._assert_command_sent_once (
@@ -445,9 +433,7 @@ async def test_multi_channel_aspiration(self):
445
433
wells = self .plate .get_items ("A1:B1" )
446
434
for well in wells :
447
435
well .tracker .set_liquids ([(None , 100 * 1.072 )]) # liquid class correction
448
- corrected_vol = self .hlc .compute_corrected_volume (100 )
449
- await self .lh .aspirate (self .plate ["A1:B1" ], vols = [corrected_vol ]* 2 ,
450
- ** self .hlc .make_asp_kwargs (2 ))
436
+ await self .lh .aspirate (self .plate ["A1:B1" ], vols = [100 ]* 2 )
451
437
452
438
# This passes the test, but is not the real command.
453
439
self ._assert_command_sent_once (
@@ -463,10 +449,8 @@ async def test_multi_channel_aspiration(self):
463
449
464
450
async def test_aspirate_single_resource (self ):
465
451
self .lh .update_head_state ({i : self .tip_rack .get_tip (i ) for i in range (5 )})
466
- corrected_vol = self .hlc .compute_corrected_volume (10 )
467
452
with no_volume_tracking ():
468
- await self .lh .aspirate ([self .bb ]* 5 ,vols = [corrected_vol ]* 5 , use_channels = [0 ,1 ,2 ,3 ,4 ],
469
- liquid_height = [1 ]* 5 , ** self .hlc .make_asp_kwargs (5 ))
453
+ await self .lh .aspirate ([self .bb ]* 5 ,vols = [10 ]* 5 , use_channels = [0 ,1 ,2 ,3 ,4 ], liquid_height = [1 ]* 5 )
470
454
self ._assert_command_sent_once (
471
455
"C0ASid0002at0 0 0 0 0 0&tm1 1 1 1 1 0&xp04865 04865 04865 04865 04865 00000&yp2098 1962 "
472
456
"1825 1688 1552 0000&th2450te2450lp2000 2000 2000 2000 2000 2000&ch000 000 000 000 000 000&"
@@ -485,11 +469,9 @@ async def test_aspirate_single_resource(self):
485
469
486
470
async def test_dispense_single_resource (self ):
487
471
self .lh .update_head_state ({i : self .tip_rack .get_tip (i ) for i in range (5 )})
488
- hlc = StandardVolumeFilter_Water_DispenseJet_Empty
489
- corrected_vol = hlc .compute_corrected_volume (10 )
490
472
with no_volume_tracking ():
491
- await self .lh .dispense ([self .bb ]* 5 , vols = [corrected_vol ]* 5 , liquid_height = [ 1 ] * 5 ,
492
- jet = [ True ]* 5 , blow_out = [True ]* 5 , ** hlc . make_disp_kwargs ( 5 ) )
473
+ await self .lh .dispense ([self .bb ]* 5 , vols = [10 ]* 5 , use_channels = [ 0 , 1 , 2 , 3 , 4 ] ,
474
+ liquid_height = [ 1 ]* 5 , blow_out = [True ]* 5 , jet = [ True ] * 5 )
493
475
self ._assert_command_sent_once (
494
476
"C0DSid0002dm1 1 1 1 1 1&tm1 1 1 1 1 0&xp04865 04865 04865 04865 04865 00000&yp2098 1962 "
495
477
"1825 1688 1552 0000&zx1200 1200 1200 1200 1200 1200&lp2000 2000 2000 2000 2000 2000&zl1210 "
@@ -507,11 +489,8 @@ async def test_single_channel_dispense(self):
507
489
self .lh .update_head_state ({0 : self .tip_rack .get_tip ("A1" )})
508
490
assert self .plate .lid is not None
509
491
self .plate .lid .unassign ()
510
- hlc = StandardVolumeFilter_Water_DispenseJet_Empty
511
- corrected_vol = hlc .compute_corrected_volume (100 )
512
492
with no_volume_tracking ():
513
- await self .lh .dispense (self .plate ["A1" ], vols = [corrected_vol ], jet = [True ], blow_out = [True ],
514
- ** hlc .make_disp_kwargs (1 ))
493
+ await self .lh .dispense (self .plate ["A1" ], vols = [100 ], jet = [True ], blow_out = [True ])
515
494
self ._assert_command_sent_once (
516
495
"C0DSid0002dm1 1&tm1 0&xp02983 00000&yp1457 0000&zx1866 1866&lp2000 2000&zl1866 1866&"
517
496
"po0100 0100&ip0000 0000&it0 0&fp0000 0000&zu0032 0032&zr06180 06180&th2450te2450"
@@ -525,11 +504,8 @@ async def test_multi_channel_dispense(self):
525
504
# TODO: Hamilton liquid classes
526
505
assert self .plate .lid is not None
527
506
self .plate .lid .unassign ()
528
- hlc = StandardVolumeFilter_Water_DispenseJet_Empty
529
- corrected_vol = hlc .compute_corrected_volume (100 )
530
507
with no_volume_tracking ():
531
- await self .lh .dispense (self .plate ["A1:B1" ], vols = [corrected_vol ]* 2 , jet = [True ]* 2 ,
532
- blow_out = [True ]* 2 , ** hlc .make_disp_kwargs (2 ))
508
+ await self .lh .dispense (self .plate ["A1:B1" ], vols = [100 ]* 2 , jet = [True ]* 2 , blow_out = [True ]* 2 )
533
509
534
510
self ._assert_command_sent_once (
535
511
"C0DSid0002dm1 1 1&tm1 1 0&xp02983 02983 00000&yp1457 1367 0000&zx1866 1866 1866&lp2000 2000 "
@@ -577,9 +553,7 @@ async def test_core_96_aspirate(self):
577
553
# TODO: Hamilton liquid classes
578
554
assert self .plate .lid is not None
579
555
self .plate .lid .unassign ()
580
- hlc = HighVolumeFilter_96COREHead1000ul_Water_DispenseSurface_Empty
581
- corrected_volume = hlc .compute_corrected_volume (100 )
582
- await self .lh .aspirate96 (self .plate , volume = corrected_volume , ** hlc .make_asp96_kwargs ())
556
+ await self .lh .aspirate96 (self .plate , volume = 100 , blow_out = True )
583
557
584
558
# volume used to be 01072, but that was generated using a non-core liquid class.
585
559
self ._assert_command_sent_once (
@@ -594,14 +568,12 @@ async def test_core_96_dispense(self):
594
568
await self .lh .pick_up_tips96 (self .tip_rack2 ) # pick up high volume tips
595
569
if self .plate .lid is not None :
596
570
self .plate .lid .unassign ()
597
- hlc = HighVolumeFilter_96COREHead1000ul_Water_DispenseSurface_Empty
598
- corrected_volume = hlc .compute_corrected_volume (100 )
599
- await self .lh .aspirate96 (self .plate , corrected_volume , ** hlc .make_asp96_kwargs ())
571
+ await self .lh .aspirate96 (self .plate , 100 , blow_out = True ) # aspirate first
600
572
601
573
with no_volume_tracking ():
602
- await self .lh .dispense96 (self .plate , corrected_volume , blow_out = True ,
603
- ** hlc .make_disp96_kwargs ())
574
+ await self .lh .dispense96 (self .plate , 100 , blow_out = True )
604
575
576
+ # volume used to be 01072, but that was generated using a non-core liquid class.
605
577
self ._assert_command_sent_once (
606
578
"C0EDid0001da3xs02983xd0yh1457zh2450ze2450lz1999zt1866zm1866iw000ix0fh000df01083dg1200vt050"
607
579
"bv00000cm0cs1bs0020wh00hv00000hc00hp000hs1200es0050ev000zv0032ej00zq06180mj000cj0cx0cr000"
0 commit comments