Skip to content

Commit 159fd78

Browse files
committed
height<>volume functions in Tube.__init__
1 parent 945f6bc commit 159fd78

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pylabrobot/resources/tube.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import List, Optional, Tuple
1+
from typing import Callable, List, Optional, Tuple
22

33
from pylabrobot.resources.container import Container
44
from pylabrobot.resources.liquid import Liquid
@@ -21,6 +21,8 @@ def __init__(
2121
material_z_thickness: Optional[float] = None,
2222
category: str = "tube",
2323
model: Optional[str] = None,
24+
compute_volume_from_height: Optional[Callable[[float], float]] = None,
25+
compute_height_from_volume: Optional[Callable[[float], float]] = None,
2426
):
2527
"""Create a new tube.
2628
@@ -43,6 +45,8 @@ def __init__(
4345
category=category,
4446
max_volume=max_volume,
4547
model=model,
48+
compute_volume_from_height=compute_volume_from_height,
49+
compute_height_from_volume=compute_height_from_volume,
4650
)
4751
self.tracker.register_callback(self._state_updated)
4852

0 commit comments

Comments
 (0)