-
Notifications
You must be signed in to change notification settings - Fork 121
Add agilent_96_wellplate_150uL_Vb #738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
3e57a69
0fb4828
c7f75a8
b4bb324
de56142
69859d5
0a1a8d5
e469313
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,37 @@ | ||
| from pylabrobot.resources.plate import Plate | ||
| from pylabrobot.resources.utils import create_ordered_items_2d | ||
| from pylabrobot.resources.well import Well, WellBottomType | ||
| from pylabrobot.resources.height_volume_functions import ( | ||
| calculate_liquid_height_container_1segment_round_vbottom, | ||
| calculate_liquid_volume_container_1segment_round_vbottom, | ||
| ) | ||
|
|
||
|
|
||
| def _compute_volume_from_height_agilent_96_wellplate_150uL_Vb( | ||
| h: float, | ||
| ): | ||
| # well depth: 12.5 mm | ||
| # well diameter at the top: 6.0 mm | ||
| if h > 12.5: | ||
| raise ValueError(f"Height {h} is too large for agilent_96_wellplate_150uL_Vb") | ||
| return calculate_liquid_volume_container_1segment_round_vbottom( | ||
| d=6.4, h_pyramid=12.5, liquid_height=h | ||
| ) | ||
|
|
||
|
|
||
| def _compute_height_from_volume_agilent_96_wellplate_150uL_Vb( | ||
| v: float, | ||
| ): | ||
| if v > 150: | ||
| raise ValueError(f"Volume {v} is too large for agilent_96_wellplate_150uL_Vb") | ||
| return calculate_liquid_height_container_1segment_round_vbottom( | ||
| d=6.4, h_pyramid=12.5, liquid_volume=v | ||
| ) | ||
|
|
||
|
|
||
| def agilent_96_wellplate_150uL_Ub(name: str) -> Plate: | ||
| """ | ||
| Part number: 5042-8502 | ||
|
|
||
| https://www.agilent.com/cs/library/datasheets/public/ds-well-plate-specifications-5994-6035en-agilent.pdf | ||
| """ | ||
|
|
||
| diameter = 6.4 # from spec | ||
|
|
@@ -41,3 +65,43 @@ def agilent_96_wellplate_150uL_Ub(name: str) -> Plate: | |
| ), | ||
| plate_type="skirted", | ||
| ) | ||
|
|
||
|
|
||
| def agilent_96_wellplate_150uL_Vb(name: str) -> Plate: | ||
| """ | ||
| Part number: 5042-8502 | ||
| """ | ||
|
|
||
| diameter = 6.4 # from spec | ||
|
|
||
| well_kwargs = { | ||
| "size_x": diameter, # from spec | ||
| "size_y": diameter, # from spec | ||
|
||
| "size_z": 14.0, # from spec | ||
| "bottom_type": WellBottomType.V, | ||
| "material_z_thickness": 0.88, # measured using z-probing | ||
| "max_volume": 150, | ||
| "compute_volume_from_height": _compute_volume_from_height_agilent_96_wellplate_150uL_Vb, | ||
| "compute_height_from_volume": _compute_height_from_volume_agilent_96_wellplate_150uL_Vb, | ||
| } | ||
|
|
||
| return Plate( | ||
| name=name, | ||
| size_x=127.8, # standard | ||
| size_y=85.5, # standard | ||
| size_z=15.9, # from spec | ||
| lid=None, | ||
| model=agilent_96_wellplate_150uL_Vb.__name__, | ||
| ordered_items=create_ordered_items_2d( | ||
| Well, | ||
| num_items_x=12, | ||
| num_items_y=8, | ||
| dx=13.4 - diameter / 2, # measured | ||
| dy=11.2 - diameter / 2, # from spec | ||
| dz=16.0 - 14.0 + 1, # spec - spec - measured | ||
| item_dx=9.0, # standard | ||
| item_dy=9.0, # standard | ||
| **well_kwargs, | ||
| ), | ||
| plate_type="skirted", | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -434,6 +434,33 @@ def calculate_liquid_height_container_1segment_round_fbottom( | |
| return liquid_height | ||
|
|
||
|
|
||
| def calculate_liquid_height_container_1segment_round_vbottom( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hard to believe that there was no existing v-bottom well calculator? |
||
| d: float, h_pyramid: float, liquid_volume: float | ||
| ) -> float: | ||
| """Calculate the height of liquid in a container with a cylindrical pyramid (cone) shape. | ||
|
|
||
| Parameters: | ||
| d: The diameter of the base of the cone in mm. | ||
| h_pyramid: The height of the cone in mm. | ||
| liquid_volume: The volume of the liquid in the container in cubic millimeters. | ||
|
|
||
| Returns: | ||
| The height of the liquid in the container in mm. | ||
| """ | ||
| r = d / 2 | ||
| max_volume = (1 / 3) * math.pi * r**2 * h_pyramid | ||
|
|
||
| if liquid_volume > max_volume: | ||
| raise ValueError( | ||
| """WARNING: Liquid overflow detected; | ||
| check your labware definition and/or that you are using the right labware.""" | ||
| ) | ||
|
|
||
| scale_factor = (liquid_volume / max_volume) ** (1 / 3) | ||
| liquid_height = scale_factor * h_pyramid | ||
| return liquid_height | ||
|
|
||
|
|
||
| def calculate_liquid_volume_container_1segment_round_fbottom( | ||
| d: float, h_cylinder: float, liquid_height: float | ||
| ) -> float: | ||
|
|
@@ -458,6 +485,33 @@ def calculate_liquid_volume_container_1segment_round_fbottom( | |
| return cylinder_liquid_volume | ||
|
|
||
|
|
||
| def calculate_liquid_volume_container_1segment_round_vbottom( | ||
| d: float, h_pyramid: float, liquid_height: float | ||
| ) -> float: | ||
| """Calculate the volume of liquid in a container with a cylindrical pyramid (cone) shape. | ||
|
|
||
| Parameters: | ||
| d: The diameter of the base of the cone in mm. | ||
| h_pyramid: The height of the cone in mm. | ||
| liquid_height: The height of the liquid in the container in mm. | ||
|
|
||
| Returns: | ||
| The volume of the liquid in cubic millimeters. | ||
| """ | ||
| r = d / 2 | ||
| if liquid_height > h_pyramid: | ||
| raise ValueError( | ||
| """WARNING: Liquid overflow detected; | ||
| check your labware definition and/or that you are using the right labware.""" | ||
| ) | ||
|
|
||
| scale_factor = liquid_height / h_pyramid | ||
| liquid_volume = (1 / 3) * math.pi * r**2 * h_pyramid * (scale_factor**3) | ||
| return liquid_volume | ||
|
|
||
|
|
||
|
|
||
|
|
||
| ### Example of usage using a lambda function: | ||
| # def Rectangular_Reservoir(name: str) -> Plate: | ||
| # """ An 8 well reservoir with a 30mL volume. """ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.