Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
44 changes: 34 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,21 @@ nimbus.move_plate(plate="sample_plate", to="plate_carrier-4")
```

What is fitted to each robot is the worktable file's `equipment`, because IvoryOS reads a deck's
instruments once, when it starts: on a Flex or OT-2 the pipette on each mount; on a STAR or Prep which
parts it has (`{"pipettes": true, "head96": true, "iswap": true, ...}`). Simulated, it is what the
simulator has (on a STAR, PyLabRobot's recording of that frame; `{"head384": true}` picks the
384-head recording). A real robot is asked once when the file does not say, and the answer is
written to the file; each time it is set up, what it reports is checked against the file.
instruments once, when it starts: on a Flex or OT-2 the pipette on each mount; on a STAR how many
channels and which parts it has (`{"channels": 8, "head96": true, "iswap": true, ...}`); on a Prep
which parts it has. A real robot is asked once when the file does not say, and the answer is written
to the file; each time it is set up, what it reports is checked against the file.

Simulated, an Opentrons robot has whatever pipettes the file says. A simulated STAR is PyLabRobot's
recording of that frame (8 channels, a 96-head, an iSWAP, CoRe grippers, an autoload) changed to
what the file says, so a dry run matches the STAR it stands in for: 2, 4 or 8 channels on a STARlet
and 2, 4, 8, 12 or 16 on a STAR or STARplus (PyLabRobot's simulator cannot model one), a 96-head, a
384-head (STAR and STARlet) or none, and the iSWAP and autoload (not on a STARplus, whose recording
has none) or not. A simulated Prep is PyLabRobot's recording of one, as it is.

A STAR's or a Prep's channels and heads are built into it, so a real one's are shown and not changed;
an Opentrons pipette is swapped by hand, so a real Flex's or OT-2's are changed in the file (or the
Labware panel) when the pipette on the robot is.

Each robot module keeps a `SKIPPED` table of the PyLabRobot methods it cannot offer as a step, and
why: an argument of a type a form cannot fill (a callback, a colour) with no default.
Expand Down Expand Up @@ -330,17 +340,22 @@ in a deck file (or `ivoryos_edge.run(__name__, plugins=[plr_ivoryos.labware_view
beside every page. **Edit layout** changes the worktable file as you go, with nothing to confirm.
It shows the layout and the labware to place; the rest is under **⋯**, and **?** explains it all:

- on a Flex, what is mounted (**⋯ → Pipettes and gripper…**): the pipette on each mount or the
96-channel head, the gripper, the trash slot; on a robot with several worktables (a STAR,
STARlet or STARplus, an EVO 100, 150 or 200), which one (**⋯ → Robot…**);
- what is fitted, named in the panel's header: click it (or **⋯ → Equipment…**). A Flex: the
pipette on each mount or the 96-channel head, the gripper, the trash slot. An OT-2: the pipette on
each mount. A simulated STAR: its channels, head, iSWAP and autoload. A real STAR, and a Prep, show
theirs. On a robot with several worktables (a STAR, STARlet or STARplus, an EVO 100, 150 or 200),
which one is there too;
- drag labware from PyLabRobot's catalogue (the robot's own tip racks and carriers, and any plate,
reservoir or tube rack) onto an empty slot or carrier position; drag what is there to move it,
× to take it off, rename it in the list;
reservoir or tube rack) onto an empty slot or carrier position; drag what is there, by any part
of it, to move it, × to take it off, rename it in the list;
- click a plate or reservoir, pick wells, and **Fill** them with a liquid and a volume: the
`liquids` a run starts from;
- **⋯ → Import a layout…** takes a worktable file you already have; the one it replaces is kept as
`worktable.before-import.json`.

Outside **Edit layout**, click any labware to look closer: then each well or tip says what it holds
as the pointer passes over it (**Whole worktable**, or Escape, goes back).

Steps offer added, removed or renamed labware, and changed equipment, once the deck restarts (the
panel offers the restart). Moving labware, filling wells, and going back to the worktable the deck
started with need no restart. The panel is the only part of this package that imports IvoryOS, and
Expand Down Expand Up @@ -419,6 +434,15 @@ IvoryOS desktop app's decks do) uses the same plr-ivoryos and PyLabRobot.
so steps are ordinary synchronous calls, from IvoryOS or plain Python. The robot connects at the
first step, so a deck starts with the robot switched off.

### Not released yet

- **What is fitted, from the Labware panel, on every robot**: click it in the panel's header. An
OT-2's mounts can be changed now (before, only a Flex's); a simulated STAR has the channels (2 to
16), head, iSWAP and autoload its file says, instead of always PyLabRobot's recording; a real STAR
and a Prep show theirs.
- In the panel, labware is dragged by any part of it, wells and tips included, and clicked anywhere
to look closer; then each well or tip says what it holds as the pointer passes over it.

### What changed in 1.0.0b3 (still on PyLabRobot 1.0.0b1)

- **Devices** ([Devices](#devices)): every device the 0.2 line had, on PyLabRobot 1.0.0b1, so they
Expand Down
15 changes: 13 additions & 2 deletions plr_ivoryos/hamilton/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
of a Prep has fitted (two channels, an 8-channel head, a heater shaker).
"""

from typing import Any, Dict, Optional
from typing import Any, Dict, List, Optional

from pylabrobot.hamilton.prep.device import Prep as plr_Prep, PrepDevice
from pylabrobot.hamilton.prep.driver.features.core_grippers import CoreGrippers
Expand All @@ -25,7 +25,7 @@

from plr_ivoryos import bridge
from plr_ivoryos.async_bridge import run_async
from plr_ivoryos.robot import WorktableRobot, part_class
from plr_ivoryos.robot import WorktableRobot, part_class, toggle
from plr_ivoryos.wells import Labware, Site

PARTS = ("pipettes", "head8", "core_grippers", "heater_shaker", "lights")
Expand Down Expand Up @@ -147,6 +147,17 @@ def stop(self) -> None:
def _deck_extras(self) -> dict:
return {"equipment": {part: True for part, on in self.equipment.items() if on}}

def _equipment_fields(self) -> List[dict]:
now = self.equipment
return [toggle(part, label, now.get(part)) for part, label in (
("pipettes", "Channels"), ("head8", "8-channel head"), ("core_grippers", "CoRe grippers"),
("heater_shaker", "Heater shaker"), ("lights", "Lights"))]

def _equipment_fixed(self) -> Optional[str]:
if self._simulated:
return "As PyLabRobot's recording of a Prep has it."
return "As the Prep reported it: what is built into it is not changed here."


def worktable_deck():
from plr_ivoryos import worktable
Expand Down
Loading
Loading