Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 230 additions & 0 deletions docs/user_guide/02_analytical/plate-reading/byonoy.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "6aa99372",
"metadata": {},
"outputs": [],
"source": [
"from byonoy import byonoy_absorbance_adapter, byonoy_absorbance96_base_and_reader\n",
"a = byonoy_absorbance_adapter(name='a')\n",
"b, r = byonoy_absorbance96_base_and_reader(name='b', assign=True)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "84949548",
"metadata": {},
"outputs": [],
"source": [
"a.assign_child_resource(b)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "b2e6e986",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(ResourceHolder(name=a, location=None, size_x=127.76, size_y=85.59, size_z=14.07, category=resource_holder),\n",
" ByonoyBase(name=b_base, location=Coordinate(-05.120, -05.055, 011.620), size_x=138, size_y=95.7, size_z=27.7, category=None),\n",
" PlateReader(name=b_reader, location=Coordinate(000.000, 000.000, 010.660), size_x=138, size_y=95.7, size_z=0, category=None))"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a, b, r"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "1fd4d917",
"metadata": {},
"outputs": [],
"source": [
"from pylabrobot.liquid_handling import LiquidHandler, LiquidHandlerChatterboxBackend\n",
"from pylabrobot.resources import STARDeck\n",
"\n",
"lh = LiquidHandler(deck=STARDeck(), backend=LiquidHandlerChatterboxBackend())"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "abde0e65",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Setting up the liquid handler.\n",
"Resource deck was assigned to the liquid handler.\n",
"Resource trash was assigned to the liquid handler.\n",
"Resource trash_core96 was assigned to the liquid handler.\n",
"Resource waste_block was assigned to the liquid handler.\n"
]
}
],
"source": [
"await lh.setup()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "5be9a197",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Resource plate was assigned to the liquid handler.\n"
]
}
],
"source": [
"from pylabrobot.resources.coordinate import Coordinate\n",
"from pylabrobot.resources.cellvis.plates import CellVis_96_wellplate_350uL_Fb\n",
"\n",
"\n",
"plate = CellVis_96_wellplate_350uL_Fb(name='plate')\n",
"lh.deck.assign_child_resource(plate, location=Coordinate(0, 0, 0))"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "219becbc",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Picking up resource: ResourcePickup(resource=PlateReader(name=b_reader, location=Coordinate(000.000, 000.000, 010.660), size_x=138, size_y=95.7, size_z=0, category=None), offset=Coordinate(x=0, y=0, z=0), pickup_distance_from_top=0, direction=<GripDirection.FRONT: 1>)\n",
"Dropping resource: ResourceDrop(resource=PlateReader(name=b_reader, location=Coordinate(000.000, 000.000, 010.660), size_x=138, size_y=95.7, size_z=0, category=None), destination=Coordinate(x=200, y=0, z=0), destination_absolute_rotation=Rotation(x=0, y=0, z=0), offset=Coordinate(x=0, y=0, z=0), pickup_distance_from_top=0, pickup_direction=<GripDirection.FRONT: 1>, drop_direction=<GripDirection.FRONT: 1>, rotation=0)\n",
"Resource b_reader was assigned to the liquid handler.\n"
]
}
],
"source": [
"# move the reader off the base\n",
"await lh.move_resource(r, Coordinate(200, 0, 0))"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "c7f821fd",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Resource a was assigned to the liquid handler.\n"
]
}
],
"source": [
"lh.deck.assign_child_resource(a, location=Coordinate(400, 0, 0))"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "134cd064",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Picking up resource: ResourcePickup(resource=Plate(name=plate, size_x=127.6, size_y=85.75, size_z=13.83, location=Coordinate(000.000, 000.000, 000.000)), offset=Coordinate(x=0, y=0, z=0), pickup_distance_from_top=0, direction=<GripDirection.FRONT: 1>)\n",
"Dropping resource: ResourceDrop(resource=Plate(name=plate, size_x=127.6, size_y=85.75, size_z=13.83, location=Coordinate(000.000, 000.000, 000.000)), destination=Coordinate(x=400.0, y=0.0, z=39.32), destination_absolute_rotation=Rotation(x=0, y=0, z=0), offset=Coordinate(x=0, y=0, z=0), pickup_distance_from_top=0, pickup_direction=<GripDirection.FRONT: 1>, drop_direction=<GripDirection.FRONT: 1>, rotation=0)\n",
"Resource plate was unassigned from the liquid handler.\n",
"Resource plate was assigned to the liquid handler.\n"
]
}
],
"source": [
"await lh.move_resource(plate, b.plate_holder)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "867ec7d8",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Picking up resource: ResourcePickup(resource=PlateReader(name=b_reader, location=Coordinate(200.000, 000.000, 000.000), size_x=138, size_y=95.7, size_z=0, category=None), offset=Coordinate(x=0, y=0, z=0), pickup_distance_from_top=0, direction=<GripDirection.FRONT: 1>)\n",
"Dropping resource: ResourceDrop(resource=PlateReader(name=b_reader, location=Coordinate(200.000, 000.000, 000.000), size_x=138, size_y=95.7, size_z=0, category=None), destination=Coordinate(x=394.88, y=-5.055, z=22.28), destination_absolute_rotation=Rotation(x=0, y=0, z=0), offset=Coordinate(x=0, y=0, z=0), pickup_distance_from_top=0, pickup_direction=<GripDirection.FRONT: 1>, drop_direction=<GripDirection.FRONT: 1>, rotation=0)\n",
"Resource b_reader was unassigned from the liquid handler.\n",
"Resource b_reader was assigned to the liquid handler.\n"
]
}
],
"source": [
"await lh.move_resource(r, b.reader_holder)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "439663bd",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"ResourceHolder(name=b_base_reader_holder, location=Coordinate(000.000, 000.000, 000.000), size_x=138, size_y=95.7, size_z=0, category=resource_holder)"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r.parent"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "env (3.10.15)",
"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": 5
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ Plate Readers

PyLabRobot supports the following plate readers:

- :ref:`BMG Clariostar <clariostar>`



.. toctree::
:maxdepth: 1
:hidden:

bmg-clariostar
cytation5
byonoy
5 changes: 4 additions & 1 deletion pylabrobot/liquid_handling/liquid_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1943,6 +1943,9 @@ async def drop_resource(
raise RuntimeError("No resource picked up")
resource = self._resource_pickup.resource

if isinstance(destination, Resource):
destination.check_can_drop_resource_here(resource)

# compute rotation based on the pickup_direction and drop_direction
if self._resource_pickup.direction == direction:
rotation_applied_by_move = 0
Expand Down Expand Up @@ -2292,7 +2295,7 @@ async def move_plate(
**backend_kwargs,
)

def serialize(self):
def serialize(self) -> dict:
return {**Resource.serialize(self), **Machine.serialize(self)}

@classmethod
Expand Down
1 change: 1 addition & 0 deletions pylabrobot/plate_reading/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .biotek_backend import Cytation5Backend, Cytation5ImagingConfig
from .byonoy_backend import ByonoyAbsorbance96AutomateBackend, ByonoyFluorescence96AutomateBackend
from .clario_star_backend import CLARIOStarBackend
from .image_reader import ImageReader
from .imager import Imager
Expand Down
Loading
Loading