{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Y-probing\n", "\n", "With PyLabRobot, you can probe the y position of any object on a STAR(let) deck. See also [z probing](./z-probing) for doing the same in the z direction.\n", "\n", "```{warning}\n", "This example uses the teaching tips. These are metal tips that are not forgiving. Be particularly careful when moving the channels around to avoid collisions.\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example setup" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from pylabrobot.liquid_handling import LiquidHandler, STARBackend\n", "from pylabrobot.resources import STARDeck # or STARletDeck\n", "\n", "star = STARBackend()\n", "lh = LiquidHandler(backend=star, deck=STARDeck())\n", "await lh.setup()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Capacitive y-probing using cLLD\n", "\n", "If you are mapping a capacitive surface, you can use the cLLD sensor to detect the surface.\n", "\n", "```{warning}\n", "This example uses the teaching tips. These are metal tips that are not forgiving. Be particularly careful when moving the channels around to avoid collisions.\n", "```" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "teaching_tip = lh.deck.get_resource(\"teaching_tip_rack\")[\"A1\"]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "await lh.pick_up_tips(teaching_tip)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "await star.prepare_for_manual_channel_operation(0)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# TODO: change this to a position that works for you\n", "await star.move_channel_x(0, 500)\n", "await star.move_channel_y(0, 300)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Use `STARBackend.clld_probe_y_position_using_channel` to probe the y-position of a single point at the current xz plane. This function will slowly move the channel until the liquid level sensor detects a change in capacitance. The y-point of the point of the tip is then returned." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "await star.clld_probe_y_position_using_channel(\n", " channel_idx=0,\n", " probing_direction=\"forward\",\n", ")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "await star.clld_probe_y_position_using_channel(\n", " channel_idx=0,\n", " probing_direction=\"backward\",\n", ")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "await lh.return_tips()" ] } ], "metadata": { "kernelspec": { "display_name": "env", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.15" } }, "nbformat": 4, "nbformat_minor": 2 }