Skip to content

Commit

Permalink
all labware in and passing
Browse files Browse the repository at this point in the history
  • Loading branch information
caila-marashaj committed Jan 6, 2025
1 parent a255168 commit 6bf9016
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 64 deletions.
3 changes: 0 additions & 3 deletions api/src/opentrons/protocol_engine/state/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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],
Expand All @@ -153,64 +152,38 @@
60.940,
2163.980,
3.0,
3.0
3.0,
],
[
"opentrons_10_tuberack_nest_4x50ml_6x15ml_conical",
"conicalWell15mL",
16.690,
15546.930,
3.0,
5.0
5.0,
],
[
"opentrons_10_tuberack_nest_4x50ml_6x15ml_conical",
"conicalWell50mL",
111.200,
56110.279,
3.0,
5.0
5.0,
],
[
"opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical",
"15mlconicalWell",
40.830,
15956.600,
3.0,
3.0
3.0,
],
[
"opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical",
"50mlconicalWell",
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,
],
]
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions shared-data/labware/definitions/3/nest_1_reservoir_290ml/2.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
}
}

0 comments on commit 6bf9016

Please sign in to comment.