Skip to content

Commit

Permalink
pull in all the changes to the hardware-tesing repo that have been made
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Dec 16, 2024
1 parent f4df2d6 commit 66604ff
Show file tree
Hide file tree
Showing 25 changed files with 620 additions and 91 deletions.
7 changes: 7 additions & 0 deletions hardware-testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ test-photometric:
$(python) -m hardware_testing.gravimetric --photometric --simulate --pipette 1000 --channels 96 --tip 50 --trials 1
$(python) -m hardware_testing.gravimetric --photometric --simulate --pipette 1000 --channels 96 --tip 200 --trials 1
$(python) -m hardware_testing.gravimetric --photometric --simulate --pipette 200 --channels 96 --tip 50 --trials 1
$(python) -m hardware_testing.gravimetric --photometric --simulate --pipette 200 --channels 96 --tip 20 --trials 1

.PHONY: test-gravimetric-single
test-gravimetric-single:
Expand All @@ -123,6 +124,7 @@ test-gravimetric-multi:
test-gravimetric-96:
$(python) -m hardware_testing.gravimetric --simulate --pipette 1000 --channels 96 --trials 2 --no-blank
$(python) -m hardware_testing.gravimetric --simulate --pipette 200 --channels 96 --trials 2 --no-blank
$(python) -m hardware_testing.gravimetric --simulate --pipette 200 --channels 96 --trials 1 --no-blank --increment --tip 20

.PHONY: test-gravimetric
test-gravimetric:
Expand Down Expand Up @@ -229,6 +231,11 @@ push-no-restart-ot3: sdist Pipfile.lock
.PHONY: push-ot3
push-ot3: push-no-restart-ot3 push-plot-webpage-ot3 push-description-ot3 push-labware-ot3

.PHONE: open-dev-app
open-dev-app:
cd .. && $(MAKE) -C app dev


.PHONY: push-all
push-all: clean wheel push-no-restart push-plot-webpage-ot3

Expand Down
28 changes: 19 additions & 9 deletions hardware-testing/hardware_testing/gravimetric/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@

GRAVIMETRIC_CFG_INCREMENT = {
50: {
1: {50: gravimetric_ot3_p50_single},
1: {20: gravimetric_ot3_p50_single, 50: gravimetric_ot3_p50_single},
8: {50: gravimetric_ot3_p50_multi_50ul_tip_increment},
},
200: {
96: {
20: gravimetric_ot3_p200_96,
50: gravimetric_ot3_p200_96,
200: gravimetric_ot3_p200_96,
},
Expand Down Expand Up @@ -117,14 +118,19 @@
PHOTOMETRIC_CFG = {
50: {
1: {
20: photometric_ot3_p50_single,
50: photometric_ot3_p50_single,
},
8: {
50: photometric_ot3_p50_multi,
},
},
200: {
96: {50: photometric_ot3_p200_96, 200: photometric_ot3_p200_96},
96: {
20: photometric_ot3_p200_96,
50: photometric_ot3_p200_96,
200: photometric_ot3_p200_96,
},
},
1000: {
1: {
Expand All @@ -137,7 +143,11 @@
200: photometric_ot3_p1000_multi,
1000: photometric_ot3_p1000_multi,
},
96: {50: photometric_ot3_p1000_96, 200: photometric_ot3_p1000_96},
96: {
20: photometric_ot3_p1000_96,
50: photometric_ot3_p1000_96,
200: photometric_ot3_p1000_96,
},
},
}

Expand Down Expand Up @@ -177,11 +187,11 @@ def _get_protocol_context(cls, args: argparse.Namespace) -> ProtocolContext:
"Starting opentrons-robot-server, so we can http GET labware offsets"
)
LABWARE_OFFSETS.extend(workarounds.http_get_all_labware_offsets())
ui.print_info(f"found {len(LABWARE_OFFSETS)} offsets:")
for offset in LABWARE_OFFSETS:
ui.print_info(f"\t{offset.createdAt}:")
ui.print_info(f"\t\t{offset.definitionUri}")
ui.print_info(f"\t\t{offset.vector}")
# ui.print_info(f"found {len(LABWARE_OFFSETS)} offsets:")
# for offset in LABWARE_OFFSETS:
# ui.print_info(f"\t{offset.createdAt}:")
# ui.print_info(f"\t\t{offset.definitionUri}")
# ui.print_info(f"\t\t{offset.vector}")
# gather the custom labware (for simulation)
custom_defs = {}
if args.simulate:
Expand Down Expand Up @@ -572,7 +582,7 @@ def _main(
parser.add_argument("--simulate", action="store_true")
parser.add_argument("--pipette", type=int, choices=[50, 200, 1000], required=True)
parser.add_argument("--channels", type=int, choices=[1, 8, 96], default=1)
parser.add_argument("--tip", type=int, choices=[0, 50, 200, 1000], default=0)
parser.add_argument("--tip", type=int, choices=[0, 20, 50, 200, 1000], default=0)
parser.add_argument("--trials", type=int, default=0)
parser.add_argument("--increment", action="store_true")
parser.add_argument("--return-tip", action="store_true")
Expand Down
66 changes: 51 additions & 15 deletions hardware-testing/hardware_testing/gravimetric/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,30 +88,40 @@ class PhotometricConfig(VolumetricConfig):
LIQUID_PROBE_SETTINGS: Dict[int, Dict[int, Dict[int, Dict[str, int]]]] = {
50: {
1: {
20: {
"mount_speed": 5,
"plunger_speed": 15,
"sensor_threshold_pascals": 15,
},
50: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 15,
"sensor_threshold_pascals": 15,
},
},
8: {
50: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 15,
"sensor_threshold_pascals": 15,
},
},
},
200: {
96: {
20: {
"mount_speed": 5,
"plunger_speed": 5,
"sensor_threshold_pascals": 15,
},
50: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 5,
"sensor_threshold_pascals": 15,
},
200: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 5,
"sensor_threshold_pascals": 15,
},
}
Expand All @@ -120,51 +130,56 @@ class PhotometricConfig(VolumetricConfig):
1: {
50: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 15,
"sensor_threshold_pascals": 15,
},
200: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 15,
"sensor_threshold_pascals": 15,
},
1000: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 15,
"sensor_threshold_pascals": 15,
},
},
8: {
50: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 15,
"sensor_threshold_pascals": 15,
},
200: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 15,
"sensor_threshold_pascals": 15,
},
1000: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 15,
"sensor_threshold_pascals": 15,
},
},
96: {
20: {
"mount_speed": 5,
"plunger_speed": 5,
"sensor_threshold_pascals": 15,
},
50: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 5,
"sensor_threshold_pascals": 15,
},
200: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 5,
"sensor_threshold_pascals": 15,
},
1000: {
"mount_speed": 5,
"plunger_speed": 20,
"plunger_speed": 5,
"sensor_threshold_pascals": 15,
},
},
Expand Down Expand Up @@ -194,6 +209,7 @@ def _get_liquid_probe_settings(
QC_VOLUMES_G: Dict[int, Dict[int, List[Tuple[int, List[float]]]]] = {
1: {
50: [ # P50
(20, [1.0, 20.0]),
(50, [1.0, 50.0]), # T50
],
1000: [ # P1000
Expand All @@ -214,10 +230,12 @@ def _get_liquid_probe_settings(
},
96: {
200: [
(20, [0.5, 1.0]), # T20
(50, [1.0, 50.0]), # T50
(200, [200.0]), # T200
],
1000: [ # P1000
(20, [5.0]),
(50, [5.0]), # T50
(200, [200.0]), # T200
(1000, [1000.0]), # T1000
Expand Down Expand Up @@ -279,7 +297,8 @@ def _get_liquid_probe_settings(
},
96: {
200: [
(50, [1.0, 5.0]), # T50
(20, [1.0, 0.5]), # T50
(50, [50.0]), # T50
(200, [200.0]), # T200
],
1000: [ # P1000
Expand Down Expand Up @@ -311,6 +330,11 @@ def _get_liquid_probe_settings(
# channels: [Pipette: [tip: [Volume: (%d, Cv)]]]
1: {
50: { # P50
20: {
1.0: (5.0, 4.0),
10.0: (1.0, 0.5),
20.0: (1, 0.4),
},
50: {
1.0: (5.0, 4.0),
10.0: (1.0, 0.5),
Expand Down Expand Up @@ -363,12 +387,16 @@ def _get_liquid_probe_settings(
},
96: {
200: {
50: { # T50
20: { # T20
0.5: (2.5, 2.0),
1.0: (2.5, 2.0),
2.0: (2.5, 2.0),
3.0: (2.5, 2.0),
5.0: (2.5, 2.0),
10.0: (3.1, 1.7),
},
50: { # T50
1.0: (2.5, 2.0),
50.0: (1.5, 0.75),
},
200: { # T200
Expand All @@ -378,6 +406,14 @@ def _get_liquid_probe_settings(
},
},
1000: { # P1000
20: { # T20
1.0: (2.5, 2.0),
2.0: (2.5, 2.0),
3.0: (2.5, 2.0),
5.0: (2.5, 2.0),
10.0: (3.1, 1.7),
20.0: (3.1, 1.7),
},
50: { # T50
1.0: (2.5, 2.0),
2.0: (2.5, 2.0),
Expand Down
2 changes: 1 addition & 1 deletion hardware-testing/hardware_testing/gravimetric/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ def run(cfg: config.GravimetricConfig, resources: TestResources) -> None: # noq
assert resources.recorder is not None
recorder = resources.recorder
if resources.ctx.is_simulating():
start_sim_mass = {50: 15, 200: 200, 1000: 200}
start_sim_mass = {20: 5, 50: 15, 200: 200, 1000: 200}
resources.recorder.set_simulation_mass(start_sim_mass[cfg.tip_volume])
os.makedirs(
f"{resources.test_report.parent}/{resources.test_report._run_id}", exist_ok=True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"B": {"min": 10, "max": 49.99},
"C": {"min": 2, "max": 9.999},
"D": {"min": 1, "max": 1.999},
"E": {"min": 0, "max": 0.9999},
}
_MIN_START_VOLUME_UL = {1: 500, 8: 3000, 96: 30000}
_MIN_END_VOLUME_UL = {1: 400, 8: 3000, 96: 10000}
Expand Down
1 change: 1 addition & 0 deletions hardware-testing/hardware_testing/gravimetric/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ def _load_tipracks(
)
for slot in cfg.slots_tiprack
]
print(f"LOAD TIPRack{use_adapters}")
for ls in tiprack_load_settings:
ui.print_info(f'Loading tiprack "{ls[1]}" in slot #{ls[0]}')

Expand Down
48 changes: 23 additions & 25 deletions hardware-testing/hardware_testing/gravimetric/increments.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,27 @@
},
96: {
200: {
20: {
"default": [
0.800,
1.000,
1.300,
1.700,
3.000,
5.000,
10.000,
15.000,
20.000,
24.000,
],
},
50: {
"default": [
0.700,
1.000,
1.500,
2.000,
2.500,
3.000,
4.000,
5.000,
Expand All @@ -283,41 +301,21 @@
40.000,
60.000,
],
"lowVolumeDefault": [
1.100,
1.200,
1.370,
1.700,
2.040,
2.660,
3.470,
3.960,
4.350,
4.800,
5.160,
5.890,
6.730,
8.200,
10.020,
11.100,
14.910,
28.940,
48.27,
],
},
200: {
"default": [
1.000,
2.000,
3.000,
4.000,
5.000,
6.000,
7.000,
8.000,
9.000,
10.000,
20.000,
50.000,
100.000,
150.000,
200.000,
210.000,
220.000,
],
},
Expand Down
Loading

0 comments on commit 66604ff

Please sign in to comment.