diff --git a/api/src/opentrons/protocol_engine/state/geometry.py b/api/src/opentrons/protocol_engine/state/geometry.py index 07ca3843a1b..e0d9cb1afa1 100644 --- a/api/src/opentrons/protocol_engine/state/geometry.py +++ b/api/src/opentrons/protocol_engine/state/geometry.py @@ -569,8 +569,6 @@ def get_well_height( ) -> float: """Get the height of a specified well for a labware.""" well_def = self._labware.get_well_definition(labware_id, well_name) - # if labware_id == "axygen_1_reservoir_90ml": - # breakpoint() return well_def.depth def _get_highest_z_from_labware_data(self, lw_data: LoadedLabware) -> float: @@ -1530,7 +1528,6 @@ def get_well_volume_at_height( ) -> float: """Convert well height to volume.""" well_geometry = self._labware.get_well_geometry(labware_id, well_name) - # breakpoint() return find_volume_at_well_height( target_height=height, well_geometry=well_geometry ) diff --git a/api/tests/opentrons/protocol_engine/state/inner_geometry_test_params.py b/api/tests/opentrons/protocol_engine/state/inner_geometry_test_params.py index 93e6a4fa71b..5b30980fea1 100644 --- a/api/tests/opentrons/protocol_engine/state/inner_geometry_test_params.py +++ b/api/tests/opentrons/protocol_engine/state/inner_geometry_test_params.py @@ -5,8 +5,6 @@ - The other is a nominal top volume, calculated some set distance from the top of the inside of the well. """ labware_to_test = [ - # "opentrons_96_aluminumblock_generic_pcr_strip_200ul", - # "opentrons_24_tuberack_generic_2ml_screwcap", "appliedbiosystemsmicroamp_384_wellplate_40ul", "biorad_384_wellplate_50ul", "corning_96_wellplate_360ul_flat", @@ -71,14 +69,11 @@ 3.0, 3.0, ], - # weird one ["nest_1_reservoir_290ml", "cuboidalWell", 16570.380, 271690.520, 3.0, 3.0], - # failing isclose ["opentrons_24_tuberack_nest_2ml_snapcap", "conicalWell", 69.62, 2148.5, 3.0, 3.0], ["nest_96_wellplate_2ml_deep", "cuboidalWell", 118.3, 2060.4, 3.0, 3.0], ["opentrons_24_tuberack_nest_1.5ml_snapcap", "conicalWell", 27.8, 1682.3, 3.0, 3.0], ["nest_12_reservoir_15ml", "cuboidalWell", 1219.0, 13236.1, 3.0, 3.0], - # weird one ["nest_1_reservoir_195ml", "cuboidalWell", 14034.2, 172301.9, 3.0, 3.0], [ "opentrons_24_tuberack_nest_0.5ml_screwcap", @@ -114,11 +109,16 @@ 3.0, 3.0, ], - # failed - squared cone - ["usascientific_12_reservoir_22ml", "cuboidalWell", 61.6, 21111.5, 3.0, 3.0], + ["usascientific_12_reservoir_22ml", "cuboidalWell", 529.36, 21111.5, 3.0, 3.0], ["thermoscientificnunc_96_wellplate_2000ul", "conicalWell", 73.5, 1768.0, 3.0, 3.0], - # skipped usascientific_96_wellplate_2.4ml_deep since it doesnt have a definition yet - # weird one + [ + "usascientific_96_wellplate_2.4ml_deep", + "cuboidalWell", + 72.220, + 2241.360, + 3.0, + 3.0, + ], ["agilent_1_reservoir_290ml", "cuboidalWell", 15652.9, 268813.8, 3.0, 3.0], [ "opentrons_24_tuberack_eppendorf_1.5ml_safelock_snapcap", @@ -135,7 +135,6 @@ ["corning_48_wellplate_1.6ml_flat", "conicalWell", 268.9, 1327.0, 3.0, 3.0], ["biorad_96_wellplate_200ul_pcr", "conicalWell", 17.9, 161.2, 3.0, 3.0], ["axygen_1_reservoir_90ml", "cuboidalWell", 22373.4, 70450.6, 3.0, 3.0], - # fails- this one thought it was a rectangle ? ["corning_384_wellplate_112ul_flat", "flatWell", 22.4, 77.4, 2.88, 3.0], ["corning_96_wellplate_360ul_flat", "conicalWell", 97.2, 257.1, 3.0, 3.0], ["biorad_384_wellplate_50ul", "conicalWell", 7.7, 27.8, 3.0, 3.0], @@ -153,7 +152,7 @@ 60.940, 2163.980, 3.0, - 3.0 + 3.0, ], [ "opentrons_10_tuberack_nest_4x50ml_6x15ml_conical", @@ -161,7 +160,7 @@ 16.690, 15546.930, 3.0, - 5.0 + 5.0, ], [ "opentrons_10_tuberack_nest_4x50ml_6x15ml_conical", @@ -169,7 +168,7 @@ 111.200, 56110.279, 3.0, - 5.0 + 5.0, ], [ "opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical", @@ -177,7 +176,7 @@ 40.830, 15956.600, 3.0, - 3.0 + 3.0, ], [ "opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical", @@ -185,32 +184,6 @@ 163.860, 57720.510, 3.0, - 3.0 - ] -] -print(f"len of existing labware = {len(INNER_WELL_GEOMETRY_TEST_PARAMS)}") -existing_names = [param[0] for param in INNER_WELL_GEOMETRY_TEST_PARAMS] -diff = set(labware_to_test).difference(set(existing_names)) -print("\nlabware missing:") -for missing in diff: - print(missing) - -gotta_add = [ - # "opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap", - # check if the test is looking for the right name below - # "opentrons_10_tuberack_nest_4x50ml_6x15ml_conical-15mL-ONLY", - # "opentrons_10_tuberack_nest_4x50ml_6x15ml_conical-50mL-ONLY", - # "opentrons_24_tuberack_generic_2ml_screwcap", # doesnt have volume estimates - # check if the test is looking for the right name below - # "opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical-50mL-ONLY", - # "opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical-15mL-ONLY", - "usascientific_96_wellplate_2.4ml_deep" # definition isnt in yet -] -failing = [ - "corning_384_wellplate_112ul_flat", - "agilent_1_reservoir_290ml", - "usascientific_12_reservoir_22ml", - "nest_1_reservoir_195ml", - "opentrons_24_tuberack_nest_2ml_snapcap", - "nest_1_reservoir_290ml", + 3.0, + ], ] diff --git a/api/tests/opentrons/protocol_engine/state/test_geometry_view.py b/api/tests/opentrons/protocol_engine/state/test_geometry_view.py index 62c56cb42cb..8f28c6de88e 100644 --- a/api/tests/opentrons/protocol_engine/state/test_geometry_view.py +++ b/api/tests/opentrons/protocol_engine/state/test_geometry_view.py @@ -3397,7 +3397,7 @@ def _get_labware_def() -> LabwareDefinition: def_dir = str(get_shared_data_root()) + f"/labware/definitions/3/{labware_id}" version_str = max([str(version) for version in listdir(def_dir)]) def_path = path.join(def_dir, version_str) - _labware_def = LabwareDefinition.parse_obj( + _labware_def = LabwareDefinition.model_validate( json.loads(load_shared_data(def_path).decode("utf-8")) ) return _labware_def @@ -3461,7 +3461,7 @@ def _get_labware_def() -> LabwareDefinition: def_dir = str(get_shared_data_root()) + f"/labware/definitions/3/{labware_id}" version_str = max([str(version) for version in listdir(def_dir)]) def_path = path.join(def_dir, version_str) - _labware_def = LabwareDefinition.parse_obj( + _labware_def = LabwareDefinition.model_validate( json.loads(load_shared_data(def_path).decode("utf-8")) ) return _labware_def diff --git a/shared-data/labware/definitions/3/nest_1_reservoir_290ml/2.json b/shared-data/labware/definitions/3/nest_1_reservoir_290ml/2.json index e3cf1b6c05f..20927973ac5 100644 --- a/shared-data/labware/definitions/3/nest_1_reservoir_290ml/2.json +++ b/shared-data/labware/definitions/3/nest_1_reservoir_290ml/2.json @@ -57,22 +57,22 @@ "sections": [ { "shape": "cuboidal", - "topXDimension": 70.6, - "topYDimension": 106.8, - "bottomXDimension": 71.3, - "bottomYDimension": 107.3, - "topHeight": 2.05, + "topXDimension": 7.75, + "topYDimension": 70.75, + "bottomXDimension": 3.127, + "bottomYDimension": 66.85, + "topHeight": 2.00, "bottomHeight": 0.0, "xCount": 12 }, { "shape": "cuboidal", - "topXDimension": 107.72, - "topYDimension": 71.0, + "topXDimension": 107.76, + "topYDimension": 71.00, "bottomXDimension": 106.75, "bottomYDimension": 70.75, "topHeight": 39.550, - "bottomHeight": 2.05 + "bottomHeight": 2.00 } ] } diff --git a/shared-data/labware/definitions/3/usascientific_12_reservoir_22ml/2.json b/shared-data/labware/definitions/3/usascientific_12_reservoir_22ml/2.json index 6d38ae2fd21..74b4b9755b7 100644 --- a/shared-data/labware/definitions/3/usascientific_12_reservoir_22ml/2.json +++ b/shared-data/labware/definitions/3/usascientific_12_reservoir_22ml/2.json @@ -204,24 +204,32 @@ "innerLabwareGeometry": { "cuboidalWell": { "sections": [ + { + "shape": "spherical", + "radiusOfCurvature": 1.5362, + "topHeight": 0.250, + "bottomHeight": 0.0, + "yCount": 8 + }, { "shape": "squaredcone", "bottomCrossSection": "circular", - "circleDiameter": 2.5, - "rectangleXDimension": 7.98, - "rectangleYDimension": 70.98, - "topHeight": 4.05, - "bottomHeight": 0.0, + "circleDiameter": 1.68, + "rectangleXDimension": 7.9, + "rectangleYDimension": 7.9, + "topHeight": 4.0, + "bottomHeight": 0.25, + "xCount": 1, "yCount": 8 }, { "shape": "cuboidal", "topXDimension": 8.34, "topYDimension": 71.85, - "bottomXDimension": 7.98, - "bottomYDimension": 70.98, + "bottomXDimension": 7.9, + "bottomYDimension": 71.75, "topHeight": 41.75, - "bottomHeight": 4.05 + "bottomHeight": 4.00 } ] } diff --git a/shared-data/labware/definitions/3/usascientific_96_wellplate_2.4ml_deep/2.json b/shared-data/labware/definitions/3/usascientific_96_wellplate_2.4ml_deep/2.json index d9741e18c57..d11c4e30b15 100644 --- a/shared-data/labware/definitions/3/usascientific_96_wellplate_2.4ml_deep/2.json +++ b/shared-data/labware/definitions/3/usascientific_96_wellplate_2.4ml_deep/2.json @@ -1211,7 +1211,26 @@ }, "innerLabwareGeometry": { "cuboidalWell": { - "sections": [] + "sections": [ + { + "shape": "cuboidal", + "topXDimension": 7.52, + "topYDimension": 7.52, + "bottomXDimension": 0.25, + "bottomYDimension": 0.25, + "topHeight": 2.63, + "bottomHeight": 0.0 + }, + { + "shape": "cuboidal", + "topXDimension": 8.20, + "topYDimension": 8.20, + "bottomXDimension": 7.52, + "bottomYDimension": 7.52, + "topHeight": 41.30, + "bottomHeight": 2.63 + } + ] } } }