diff --git a/docs/resources/index.md b/docs/resources/index.md index 86aa4006dbc..9847127ccca 100644 --- a/docs/resources/index.md +++ b/docs/resources/index.md @@ -186,6 +186,7 @@ library/falcon library/greiner library/hamilton library/imcs +library/mckesson library/nest library/opentrons library/perkin_elmer diff --git a/docs/resources/library/img/mckesson/McKesson_tube_5mL_Rb.jpg b/docs/resources/library/img/mckesson/McKesson_tube_5mL_Rb.jpg new file mode 100644 index 00000000000..7eaa0023af2 Binary files /dev/null and b/docs/resources/library/img/mckesson/McKesson_tube_5mL_Rb.jpg differ diff --git a/docs/resources/library/mckesson.md b/docs/resources/library/mckesson.md new file mode 100644 index 00000000000..a3d6fdeab50 --- /dev/null +++ b/docs/resources/library/mckesson.md @@ -0,0 +1,7 @@ +# McKesson + +## Tubes + +| Description | Image | PLR definition | +|-|-|-| +| McKesson Premium Glass Culture Tube
Part no. 177-1505
[Manufacturer product page](https://mms.mckesson.com/product/1082085/McKesson-Brand-177-1505) · [Specifications](https://imgcdn.mckesson.com/CumulusWeb/Click_and_learn/premium_glass_culture_tubes_tear_sheet_2018-07.pdf)
12 mm OD × 75 mm, 5 mL
Round-bottom borosilicate glass with a fire-polished rim
Plain, clear, non-sterile, without closure
250/box, 4 boxes/case | ![McKesson 177-1505 glass culture tube](img/mckesson/McKesson_tube_5mL_Rb.jpg) | `McKesson_tube_5mL_Rb` | diff --git a/pylabrobot/resources/__init__.py b/pylabrobot/resources/__init__.py index 07e878f25eb..edec60d24fe 100644 --- a/pylabrobot/resources/__init__.py +++ b/pylabrobot/resources/__init__.py @@ -33,6 +33,7 @@ from .lid import Lid, Liddable from .liquid import Liquid from .manipulator import LinkBody +from .mckesson import * from .n_channel_pipettes import NChannelPipette, TipMountingShaft, TipPickupMode from .nest import * from .opentrons import * diff --git a/pylabrobot/resources/mckesson/__init__.py b/pylabrobot/resources/mckesson/__init__.py new file mode 100644 index 00000000000..111259f46e6 --- /dev/null +++ b/pylabrobot/resources/mckesson/__init__.py @@ -0,0 +1 @@ +from .tubes import * diff --git a/pylabrobot/resources/mckesson/tubes.py b/pylabrobot/resources/mckesson/tubes.py new file mode 100644 index 00000000000..769a99e3676 --- /dev/null +++ b/pylabrobot/resources/mckesson/tubes.py @@ -0,0 +1,46 @@ +"""Resource definitions for McKesson tubes.""" + +from pylabrobot.resources.tube import Tube, TubeBottomType + + +def McKesson_tube_5mL_Rb(name: str) -> Tube: + """McKesson Premium Glass Culture Tube, manufacturer no. 177-1505. + + The uncapped borosilicate tube has a round bottom and a fire-polished rim. + The cavity floor is modeled 1 mm above the outside base. + + Height and volume are converted by piecewise-linear interpolation of measured + liquid heights. The measured range is 200–5,000 uL, corresponding to + 2.50–56.32 mm above the cavity floor. Values outside these ranges raise + ValueError. + + Manufacturer specification + https://imgcdn.mckesson.com/CumulusWeb/Click_and_learn/premium_glass_culture_tubes_tear_sheet_2018-07.pdf + + Args: + name: Name of the tube. + """ + diameter = 12 # from spec, outside diameter in mm + material_z_thickness = 1.0 # estimated cavity-floor offset in mm + return Tube( + name=name, + size_x=diameter, + size_y=diameter, + size_z=75, # from spec + material_z_thickness=material_z_thickness, + model=McKesson_tube_5mL_Rb.__name__, + max_volume=5_000, # from spec, nominal capacity in uL + bottom_type=TubeBottomType.U, # from spec + # Subtract the floor offset from the measured heights above the outside base. + height_volume_data={ + 3.5 - material_z_thickness: 200, + 6.3 - material_z_thickness: 400, + 9.28 - material_z_thickness: 600, + 11.12 - material_z_thickness: 800, + 13.2 - material_z_thickness: 1_000, + 24.95 - material_z_thickness: 2_000, + 36.31 - material_z_thickness: 3_000, + 47.33 - material_z_thickness: 4_000, + 57.32 - material_z_thickness: 5_000, + }, + ) diff --git a/pylabrobot/resources/tube.py b/pylabrobot/resources/tube.py index 0fcde5170f8..934da280ba9 100644 --- a/pylabrobot/resources/tube.py +++ b/pylabrobot/resources/tube.py @@ -70,9 +70,14 @@ def __init__( height_volume_data=height_volume_data, no_go_zones=no_go_zones, ) + self.bottom_type = bottom_type def serialize(self) -> dict: - return {**super().serialize(), "max_volume": self.max_volume} + return { + **super().serialize(), + "max_volume": self.max_volume, + "bottom_type": self.bottom_type.value, + } def set_volume(self, volume: float): """Set the volume in the tube. diff --git a/pylabrobot/resources/tube_tests.py b/pylabrobot/resources/tube_tests.py new file mode 100644 index 00000000000..72b5dac2eec --- /dev/null +++ b/pylabrobot/resources/tube_tests.py @@ -0,0 +1,29 @@ +import unittest + +from .tube import Tube, TubeBottomType + + +class TubeTests(unittest.TestCase): + def test_bottom_type_serialization(self): + tube = Tube( + name="tube", + size_x=10, + size_y=10, + size_z=75, + max_volume=4_000, + bottom_type=TubeBottomType.U, + ) + + serialized = tube.serialize() + self.assertEqual(serialized["bottom_type"], "U") + + restored = Tube.deserialize(serialized) + self.assertEqual(restored.bottom_type, TubeBottomType.U) + + def test_deserialize_without_bottom_type(self): + tube = Tube(name="tube", size_x=10, size_y=10, size_z=75, max_volume=4_000) + serialized = tube.serialize() + del serialized["bottom_type"] + + restored = Tube.deserialize(serialized) + self.assertEqual(restored.bottom_type, TubeBottomType.UNKNOWN)