Loop
Description
Represents an Inoculation Loop tool for the Jubilee machine. Enables material transfer operations between wells by sweeping and picking up/dropping off material like biological samples.
Extends the base Tool class and inherits all standard tool behaviors.
Loop operations require the tool to be active (@requires_active_tool enforced).
Constructor
python
Loop(index: int, name: str)Initializes a Loop tool.
| Parameter | Type | Description |
|---|---|---|
index | int | Tool number assigned to the loop. |
name | str | Human-readable name for the loop tool. |
Key Properties
| Property | Type | Description |
|---|---|---|
| (inherits from Tool) | No additional static properties added at initialization. |
Important Methods
| Method | Returns | Description |
|---|---|---|
transfer(source, destination, ...) | None | Transfers material from a source well to a destination well, sweeping during pickup and drop-off. |
_get_xyz(well, location) | Tuple[float] | Retrieves (x,y,z) coordinates from a Well or location tuple. |
_get_top_bottom(well) | Tuple[float, float] | Retrieves top and bottom z-heights of a Well. |
transfer()
python
transfer(
source: Well = None,
destination: Well = None,
s: int = 2000,
sweep_x: float = 5,
sweep_y: float = 5,
sweep_z: float = 10,
sweep_speed: float = 100,
up_speed: float = 800,
randomize_pickup: bool = False
)Transfers material between wells by performing a small X/Y/Z sweep inside the source well, and then another sweep at the destination well.
| Parameter | Type | Description |
|---|---|---|
source | Well or List[Well] | Source well(s) to pick up from. |
destination | Well or List[Well] | Destination well(s) to transfer to. |
s | int | Speed for normal movements (default: 2000 mm/min). |
sweep_x | float | Sweep distance along x-axis during pickup. |
sweep_y | float | Sweep distance along y-axis during pickup. |
sweep_z | float | Sweep height upward after sweeping. |
sweep_speed | float | Speed of sweeping movement (default: 100 mm/min). |
up_speed | float | Speed for retracting upward movement (default: 800 mm/min). |
randomize_pickup | bool | If True, randomizes pickup within a 20mm range around well center. |
Auto-expands source/destination lists:
- Single source to many destinations
- Many sources to one destination
- Uneven counts are repeated to match automatically (with warning)
Usage Flow Example
python
from science_jubilee.tools import Loop
from science_jubilee.machine import Machine
# Connect to machine
m = Machine(address="192.168.1.2")
# Load Loop tool
loop_tool = Loop(index=2, name="InoculationLoop")
m.load_tool(loop_tool)
m.pickup_tool(loop_tool)
# Perform transfer
loop_tool.transfer(source=wellA1, destination=wellB1)Important Notes
- Careful alignment: Wells must be correctly calibrated or offset.
- The sweep motion mimics manual inoculation: it picks up material by gentle surface contact.
- Sweep sizes and speeds are tunable per protocol or material type.
- Randomization (via
randomize_pickup=True) is useful for biological samples to avoid dry pickup from depleted zones.