You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user_guide/00_liquid-handling/hamilton-star/surface-following.ipynb
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@
9
9
"\n",
10
10
"Surface following is a feature on Hamilton liquid handling robots that makes the pipette tip follow the surface of a liquid when aspirating (going down) or dispensing (going up).\n",
11
11
"\n",
12
-
"When using automatic surface following, the robot will automatically move the Z position of the pipette tip based on a userspecified value. The amount of surface following required can be computed by subtracting the liquid level before and after each aspiration or dispense. PyLabRobot can do this automatically when the height<>volume functions for the given containers are defined. You can also specify the liquid surface following distance manually.\n",
12
+
"When using surface following, the robot will automatically move the Z position of the pipette tip the user-specified distance. The amount of surface following required can be computed by comparing the liquid level before and after each aspiration or dispense. PyLabRobot can do this automatically when the height<>volume functions for the given containers are defined. You can also specify the liquid surface following distance manually.\n",
13
13
"\n",
14
-
"It is useful to start the surface following only at the liquid level, so it is recommended to use [liquid level detection](./star_lld) with the surface following feature. (See below). VENUS also supports this.\n",
14
+
"It is useful to start the surface following only at the liquid level, so it is recommended to use [liquid level detection](./star_lld) with the surface following feature. (See below for syntax, which differs from the LLD tutorial). VENUS also supports surface following while doing LLD.\n",
15
15
"\n",
16
-
"In PLR, when we have LLD + automatic surface following, we can go beyond VENUS by computing the surface following amount based on the precise location of liquid inside the container. This is necessary because the surface following amount is not only a function of the volume of liquid aspirated or dispensed, but also of the location of liquid inside the container (see below). By doing liquid level detection first to get the precise liquid level, we can use that to compute the surface following amount based on the requested volume _and_ location of liquid inside the container.\n",
16
+
"In PLR, when we have LLD + automatic surface following, we can go beyond VENUS by computing the surface following amount based on the precise location of liquid inside the container. This is necessary because the surface following amount is not _just_ a function of the volume of liquid aspirated or dispensed, _but also_ of the location of liquid inside the container (see below). By doing liquid level detection first to get the precise liquid level, we can then use that liquid level height to compute the surface following amount based on the requested volume _and_ location of liquid inside the container.\n",
"You can probe the liquid height first using liquid level detection, and then use automatic surface following for subsequent aspirations and dispenses as follows:"
81
+
"You can probe the liquid height first using liquid level detection (capacitive), and then use automatic surface following for subsequent aspirations and dispenses as follows:"
82
82
]
83
83
},
84
84
{
85
85
"cell_type": "code",
86
-
"execution_count": 4,
86
+
"execution_count": 3,
87
87
"id": "d4858585",
88
88
"metadata": {},
89
89
"outputs": [],
@@ -113,12 +113,12 @@
113
113
"id": "0b3ac98c",
114
114
"metadata": {},
115
115
"source": [
116
-
"You can also pass the liquid height directly to the aspiration and dispense methods, and still use automatic surface following:"
116
+
"You can also pass the liquid height directly to the aspiration and dispense methods, and still use automatic surface following. This can be useful when you cannot use LLD."
117
117
]
118
118
},
119
119
{
120
120
"cell_type": "code",
121
-
"execution_count": 6,
121
+
"execution_count": 4,
122
122
"id": "ffde0c4c",
123
123
"metadata": {},
124
124
"outputs": [],
@@ -152,12 +152,12 @@
152
152
"id": "aee70228",
153
153
"metadata": {},
154
154
"source": [
155
-
"To manually specify the surface following amount, you can use the `surface_following_distance` backend kwarg of the aspiration and dispense methods. For example, to aspirate 100 µL with a surface following amount of 2 mm above the detected liquid height:"
155
+
"To manually specify the surface following amount, you can use the `surface_following_distance` backend kwarg of the aspiration and dispense methods. For example, to aspirate 100 µL with a surface following amount of 2 mm starting at the detected liquid level:"
156
156
]
157
157
},
158
158
{
159
159
"cell_type": "code",
160
-
"execution_count": 7,
160
+
"execution_count": null,
161
161
"id": "e3e205b7",
162
162
"metadata": {},
163
163
"outputs": [],
@@ -167,14 +167,14 @@
167
167
" wells,\n",
168
168
" vols,\n",
169
169
" probe_liquid_height=True,\n",
170
-
" surface_following_distance=[2] * len(wells), # mm down from liquid_height\n",
170
+
" surface_following_distance=[2] * len(wells), # mm down after finding liquid\n",
171
171
" )\n",
172
172
"\n",
173
173
" await lh.dispense(\n",
174
174
" wells,\n",
175
175
" vols,\n",
176
176
" probe_liquid_height=True,\n",
177
-
" surface_following_distance=[2] * len(wells), # mm up from liquid_height\n",
177
+
" surface_following_distance=[2] * len(wells), # mm up after finding liquid\n",
"""Probes the Z-height below the specified channel on a Hamilton STAR liquid handling machine
8215
-
using the channels 'capacitive Liquid Level Detection' (cLLD) capabilities.
8216
-
N.B.: this means only conductive materials can be probed!
8217
-
8218
-
Args:
8219
-
channel_idx: The index of the channel to use for probing. Backmost channel = 0.
8220
-
lowest_immers_pos: The lowest immersion position in mm. This is the position of the channel, NOT including the tip length (as C0 commands do). So you have to add the total_tip_length - fitting_depth.
8221
-
start_pos_lld_search: The start position for z-touch search in mm. This is the position of the channel, NOT including the tip length (as C0 commands do). So you have to add the total_tip_length - fitting_depth.
8222
-
channel_speed: The speed of channel movement in mm/sec.
8223
-
channel_acceleration: The acceleration of the channel in mm/sec**2.
8224
-
detection_edge: The edge steepness at capacitive LLD detection.
8225
-
detection_drop: The offset after capacitive LLD edge detection.
8226
-
post_detection_trajectory (0, 1): Movement of the channel up (1) or down (0) after contacting the surface.
8227
-
post_detection_dist: Distance to move into the trajectory after detection in mm.
8228
-
move_channels_to_save_pos_after: Flag to move channels to a safe position after operation.
gt=f"{detection_edge:04}", # Edge steepness at capacitive LLD detection
8260
+
gl=f"{detection_drop:04}", # Offset after capacitive LLD edge detection
8261
+
zj=post_detection_trajectory, # Movement of the channel after contacting surface
8262
+
zi=f"{post_detection_dist_increments:04}", # Distance to move up after detection [increment]
8263
+
)
8264
+
8265
+
asyncdefclld_probe_z_height_using_channel(
8266
+
self,
8267
+
channel_idx: int, # 0-based indexing of channels!
8268
+
lowest_immers_pos: float=99.98, # mm
8269
+
start_pos_search: float=330.0, # mm
8270
+
channel_speed: float=10.0, # mm
8271
+
channel_acceleration: float=800.0, # mm/sec**2
8272
+
detection_edge: int=10,
8273
+
detection_drop: int=2,
8274
+
post_detection_trajectory: Literal[0, 1] =1,
8275
+
post_detection_dist: float=2.0, # mm
8276
+
move_channels_to_save_pos_after: bool=False,
8277
+
) ->float:
8278
+
"""Probes the Z-height below the specified channel on a Hamilton STAR liquid handling machine
8279
+
using the channels 'capacitive Liquid Level Detection' (cLLD) capabilities.
8280
+
N.B.: this means only conductive materials can be probed!
8281
+
8282
+
Args:
8283
+
channel_idx: The index of the channel to use for probing. Backmost channel = 0.
8284
+
lowest_immers_pos: The lowest immersion position in mm. This is the position of the channel, NOT including the tip length (as C0 commands do). So you have to add the total_tip_length - fitting_depth.
8285
+
start_pos_lld_search: The start position for z-touch search in mm. This is the position of the channel, NOT including the tip length (as C0 commands do). So you have to add the total_tip_length - fitting_depth.
8286
+
channel_speed: The speed of channel movement in mm/sec.
8287
+
channel_acceleration: The acceleration of the channel in mm/sec**2.
8288
+
detection_edge: The edge steepness at capacitive LLD detection.
8289
+
detection_drop: The offset after capacitive LLD edge detection.
8290
+
post_detection_trajectory (0, 1): Movement of the channel up (1) or down (0) after contacting the surface.
8291
+
post_detection_dist: Distance to move into the trajectory after detection in mm.
8292
+
move_channels_to_save_pos_after: Flag to move channels to a safe position after operation.
8293
+
8294
+
Returns:
8295
+
The detected Z-height in mm.
8296
+
"""
8297
+
8269
8298
try:
8270
-
awaitself.send_command(
8271
-
module=STARBackend.channel_id(channel_idx),
8272
-
command="ZL",
8273
-
zh=f"{lowest_immers_pos_increments:05}", # Lowest immersion position [increment]
8274
-
zc=f"{start_pos_search_increments:05}", # Start position of LLD search [increment]
8275
-
zl=f"{channel_speed_increments:05}", # Speed of channel movement
0 commit comments