Position
This module contains classes and functions for dealing with positioning in a robotic set up.
ATTRIBUTE | DESCRIPTION |
---|---|
MTP_DIMENSIONS |
Microtiter plate dimensions in mm
TYPE:
|
OBB_DIMENSIONS |
Optical Breadboard dimensions in mm
TYPE:
|
CLASS | DESCRIPTION |
---|---|
Position |
represents a 3D position with orientation |
Well |
represents a single well in a Labware object |
Labware |
represents a single Labware object |
Slot |
represents a single Slot object on a Deck object or another Labware object (for stackable Labware) |
Deck |
represents a Deck object |
BoundingVolume |
represents a 3D bounding volume |
BoundingBox |
represents a 3D bounding box |
FUNCTION | DESCRIPTION |
---|---|
convert_to_position |
Convert a value to a Position object |
get_transform |
Get transformation matrix from initial to final points, with the first point in each set being the center of rotation |
Documentation last updated: 2025-06-11
MTP_DIMENSIONS
module-attribute
Microtiter plate dimensions in mm
BoundingBox
dataclass
BoundingBox(
*,
parametric_function: dict[
str, Callable[[Sequence[float], Any], bool]
],
reference: Position = Position(),
dimensions: Sequence[float] | ndarray = (0, 0, 0),
buffer: Sequence[Sequence[float]] | ndarray = (
(0, 0, 0),
(0, 0, 0),
),
)
Bases: BoundingVolume
BoundingBox represents a single BoundingBox object
ATTRIBUTE | DESCRIPTION |
---|---|
reference |
reference point
TYPE:
|
dimensions |
x,y,z dimensions
TYPE:
|
buffer |
lower and upper buffer
TYPE:
|
bounds |
lower and upper bounds
TYPE:
|
METHOD | DESCRIPTION |
---|---|
contains |
check if point is within BoundingBox |
__add__
__add__(
other: BoundingVolume | BoundingBox | None,
) -> BoundingVolume | BoundingBox
Add two BoundingVolumes together
PARAMETER | DESCRIPTION |
---|---|
other
|
another
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
BoundingVolume | BoundingBox
|
BoundingVolume|BoundingBox: new |
BoundingVolume
dataclass
BoundingVolume represents a single BoundingVolume object
ATTRIBUTE | DESCRIPTION |
---|---|
parametric_function |
name, parametric function
TYPE:
|
METHOD | DESCRIPTION |
---|---|
contains |
check if point is within BoundingVolume |
__add__
__add__(other: BoundingVolume | None) -> BoundingVolume
Add two BoundingVolumes together
PARAMETER | DESCRIPTION |
---|---|
other
|
another
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
BoundingVolume
|
new
TYPE:
|
Deck
dataclass
Deck(
name: str,
_details: dict[str, Any],
parent: Deck | None = None,
_nesting_lineage: tuple[Path] = (None,),
)
Deck represents a single Deck object
ATTRIBUTE | DESCRIPTION |
---|---|
name |
name of Deck
TYPE:
|
native |
native Deck object (i.e. without parent)
TYPE:
|
details |
dictionary read from Deck file
TYPE:
|
parent |
parent Deck object
TYPE:
|
reference |
reference point of Deck
TYPE:
|
x |
x offset
TYPE:
|
y |
y offset
TYPE:
|
z |
z offset
TYPE:
|
offset |
Deck offset from parent Deck reference point
TYPE:
|
center |
center of Deck
TYPE:
|
bottom_left_corner |
bottom left corner of Deck
TYPE:
|
dimensions |
size of Deck
TYPE:
|
exclusion_zone |
exclusion zones to avoid
TYPE:
|
slots |
contained Slot objects
TYPE:
|
zones |
nested Deck objects
TYPE:
|
entry_waypoints |
entry waypoints for Deck
TYPE:
|
at |
namespace of all Slots
TYPE:
|
on |
namespace of all nested Decks
TYPE:
|
METHOD | DESCRIPTION |
---|---|
fromConfigs |
factory method to load Deck details from dictionary |
fromFile |
factory method to load Deck from file |
getAllPositions |
get all positions in Deck |
getSlot |
get Slot using its name or index |
isExcluded |
checks and returns whether the coordinates are in an excluded region |
loadNestedDeck |
load nested Deck object from dictionary |
loadLabware |
load Labware into Slot |
removeLabware |
remove Labware from Slot using its name or index |
transferLabware |
transfer Labware between Slots |
show |
show Deck on matplotlib axis |
fromConfigs
classmethod
fromConfigs(
details: dict[str, Any],
parent: Deck | None = None,
_nesting_lineage: Sequence[Path | None] = (None,),
) -> Deck
Factory method to load Deck details from dictionary
PARAMETER | DESCRIPTION |
---|---|
details
|
dictionary read from Deck file
TYPE:
|
parent
|
parent
TYPE:
|
_nesting_lineage
|
lineage of nested decks. Defaults to (None,).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Deck
|
TYPE:
|
fromFile
classmethod
Factory method to load Deck from file
PARAMETER | DESCRIPTION |
---|---|
deck_file
|
filepath of Deck file
TYPE:
|
parent
|
parent
TYPE:
|
from_repo
|
whether to load from repo. Defaults to True.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Deck
|
TYPE:
|
getAllPositions
Get all positions in Deck
RETURNS | DESCRIPTION |
---|---|
dict[str, tuple[float] | dict]
|
dict[str, tuple[float]]: dictionary of all positions |
getSlot
getSlot(value: int | str) -> Slot | None
Get Labware in slot using slot id or name
PARAMETER | DESCRIPTION |
---|---|
value
|
slot id or name
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Slot
|
TYPE:
|
isExcluded
Checks and returns whether the coordinates are in an excluded region
PARAMETER | DESCRIPTION |
---|---|
coordinates
|
x,y,z coordinates
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
bool
|
whether coordinates are in an excluded region
TYPE:
|
loadLabware
loadNestedDeck
Load nested Deck
object from dictionary
PARAMETER | DESCRIPTION |
---|---|
name
|
name of nested
TYPE:
|
details
|
dictionary read from Deck file
TYPE:
|
removeLabware
show
Show Deck on matplotlib axis
PARAMETER | DESCRIPTION |
---|---|
zoom_out
|
whether to use zoomed out view. Defaults to False.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Figure, Axes]
|
tuple[matplotlib.pyplot.Figure, matplotlib.pyplot.Axes]: matplotlib figure, axes |
Labware
dataclass
Labware(
name: str,
_details: dict[str, Any],
parent: Slot | None = None,
)
Labware represents a single Labware object
ATTRIBUTE | DESCRIPTION |
---|---|
name |
name of Labware
TYPE:
|
native |
native Labware object (i.e. without parent)
TYPE:
|
details |
dictionary read from Labware file
TYPE:
|
parent |
parent Slot object
TYPE:
|
reference |
reference point of Slot
TYPE:
|
x |
x offset
TYPE:
|
y |
y offset
TYPE:
|
z |
z offset
TYPE:
|
offset |
Labware offset from Slot reference point
TYPE:
|
center |
center of Labware
TYPE:
|
top |
top of Labware
TYPE:
|
bottom_left_corner |
bottom left corner of Labware
TYPE:
|
dimensions |
size of Labware
TYPE:
|
exclusion_zone |
exclusion zone to avoid
TYPE:
|
wells |
wells by columns (alias for wells_columns)
TYPE:
|
wells_columns |
wells by columns
TYPE:
|
wells_rows |
wells by rows
TYPE:
|
columns |
columns and wells in columns
TYPE:
|
rows |
rows and wells in rows
TYPE:
|
at |
namespace of all Wells
TYPE:
|
is_stackable |
whether Labware is stackable
TYPE:
|
is_tiprack |
whether Labware is a tiprack
TYPE:
|
slot_above |
Slot above (for stackable Labware)
TYPE:
|
METHOD | DESCRIPTION |
---|---|
fromConfigs |
factory method to load Labware details from dictionary |
fromFile |
factory method to load Labware from file |
fromTop |
offset from top of Labware |
getAllPositions |
get all positions in Labware |
getWell |
get Well using its name |
listColumns |
list wells by columns |
listRows |
list wells by rows |
listWells |
list wells, by columns or rows |
show |
show Labware on matplotlib axis |
fromConfigs
classmethod
fromFile
classmethod
fromFile(
labware_file: str | Path,
parent: Slot | None = None,
from_repo: bool = True,
)
Factory method to load Labware from file
PARAMETER | DESCRIPTION |
---|---|
labware_file
|
filepath of Labware file
TYPE:
|
parent
|
parent
TYPE:
|
from_repo
|
whether to load from repo. Defaults to True.
TYPE:
|
fromTop
Offset from top of Labware
PARAMETER | DESCRIPTION |
---|---|
offset
|
x,y,z offset
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple
|
top of Labware with offset
TYPE:
|
getAllPositions
Get all positions in Labware
RETURNS | DESCRIPTION |
---|---|
dict[str, tuple[float] | dict[str, tuple[float] | float]]
|
dict[str, tuple[float]: dictionary of all positions |
getWell
getWell(name: str) -> Well
Get Well
using its name
PARAMETER | DESCRIPTION |
---|---|
name
|
name of well
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Well
|
TYPE:
|
listWells
listWells(by: str = 'col') -> list[Well]
List wells, by columns or rows
PARAMETER | DESCRIPTION |
---|---|
by
|
'columns' or 'rows'. Defaults to 'col'.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[Well]
|
list[Well]: list of |
show
Show Labware on matplotlib axis
PARAMETER | DESCRIPTION |
---|---|
zoom_out
|
whether to use zoomed out view. Defaults to False.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Figure, Axes]
|
tuple[matplotlib.pyplot.Figure, matplotlib.pyplot.Axes]: matplotlib figure, axes |
Position
dataclass
Position(
_coordinates: Sequence[float] | ndarray = (0, 0, 0),
Rotation: Rotation = from_euler(
"zyx", (0, 0, 0), degrees=True
),
rotation_type: str = "euler",
degrees: bool = True,
)
Position represents a 3D position with orientation
ATTRIBUTE | DESCRIPTION |
---|---|
coordinates |
X,Y,Z coordinates
TYPE:
|
degrees |
whether to use degrees for euler angles
TYPE:
|
Rotation |
scipy.spatial.transform.Rotation object
TYPE:
|
rotation |
rotation in preferred representation
TYPE:
|
rotation_type |
preferred representation of rotation
TYPE:
|
rot_matrix |
rotation matrix
TYPE:
|
x |
X coordinate
TYPE:
|
y |
Y coordinate
TYPE:
|
z |
Z coordinate
TYPE:
|
a |
euler angle a (rotation about x-axis)
TYPE:
|
b |
euler angle b (rotation about y-axis)
TYPE:
|
c |
euler angle c (rotation about z-axis)
TYPE:
|
METHOD | DESCRIPTION |
---|---|
fromJSON |
create a Position object from string |
toJSON |
convert Position to string |
apply |
apply Position to another Position |
invert |
invert vector and rotation |
orientate |
orientate self by a rotation |
translate |
translate self by a vector |
apply
fromJSON
staticmethod
fromJSON(value: str) -> Position
Create a Position
object from string
PARAMETER | DESCRIPTION |
---|---|
value
|
string representation of
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Position
|
TYPE:
|
invert
invert() -> Position
Invert vector and rotation
RETURNS | DESCRIPTION |
---|---|
Position
|
inverted
TYPE:
|
orientate
orientate(by: Rotation, inplace: bool = True) -> Position
Orientate self by a rotation
PARAMETER | DESCRIPTION |
---|---|
by
|
rotation to orientate by
TYPE:
|
inplace
|
whether to update self in place. Defaults to True.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Position
|
updated
TYPE:
|
translate
translate(
by: Sequence[float], inplace: bool = True
) -> Position
Translate self by a vector
PARAMETER | DESCRIPTION |
---|---|
by
|
translation vector
TYPE:
|
inplace
|
whether to update self in place. Defaults to True.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Position
|
updated
TYPE:
|
Slot
dataclass
Slot represents a single Slot object on a Deck object or another Labware object (for stackable Labware)
ATTRIBUTE | DESCRIPTION |
---|---|
name |
name of Slot
TYPE:
|
details |
dictionary read from Slot file
TYPE:
|
parent |
parent Deck or Labware object |
reference |
reference point of parent Deck or Labware
TYPE:
|
x |
x offset
TYPE:
|
y |
y offset
TYPE:
|
z |
z offset
TYPE:
|
offset |
Slot offset from parent reference point
TYPE:
|
center |
center of Slot
TYPE:
|
bottom_left_corner |
bottom left corner of Slot
TYPE:
|
dimensions |
size of Slot
TYPE:
|
exclusion_zone |
exclusion zone of loaded Labware to avoid
TYPE:
|
loaded_labware |
Labware loaded in Slot
TYPE:
|
slot_above |
Slot above
TYPE:
|
slot_below |
Slot below
TYPE:
|
METHOD | DESCRIPTION |
---|---|
fromCenter |
offset from center of Slot |
getAllPositions |
get all positions in Slot |
loadLabware |
load Labware in Slot |
loadLabwareFromConfigs |
load Labware from dictionary |
loadLabwareFromFile |
load Labware from file |
removeLabware |
remove Labware from Slot |
exclusion_zone
property
exclusion_zone: BoundingBox | None
Exclusion zone of loaded Labware to avoid
fromCenter
Offset from center of Slot
PARAMETER | DESCRIPTION |
---|---|
offset
|
x,y,z offset
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple
|
center of Slot with offset
TYPE:
|
getAllPositions
Get all positions in Slot
RETURNS | DESCRIPTION |
---|---|
dict[str, tuple[float] | dict]
|
dict[str, tuple[float]]: dictionary of all positions |
loadLabware
loadLabware(labware: Labware)
Load Labware in Slot
PARAMETER | DESCRIPTION |
---|---|
labware
|
TYPE:
|
loadLabwareFromConfigs
Load Labware from dictionary
PARAMETER | DESCRIPTION |
---|---|
details
|
dictionary read from Labware file
TYPE:
|
loadLabwareFromFile
Load Labware from file
PARAMETER | DESCRIPTION |
---|---|
labware_file
|
filepath of Labware file
TYPE:
|
from_repo
|
whether to load from repo. Defaults to True.
TYPE:
|
Well
dataclass
Well(
name: str,
_details: dict[str, str | float | tuple[float]],
parent: Labware,
)
Well represents a single well in a Labware object
ATTRIBUTE | DESCRIPTION |
---|---|
name |
name of well
TYPE:
|
details |
dictionary read from Labware file
TYPE:
|
parent |
parent Labware object
TYPE:
|
reference |
reference point of Labware
TYPE:
|
x |
x offset
TYPE:
|
y |
y offset
TYPE:
|
z |
z offset
TYPE:
|
offset |
well offset from Labware reference point
TYPE:
|
center |
center of well base
TYPE:
|
bottom |
bottom of well
TYPE:
|
middle |
middle of well
TYPE:
|
top |
top of well
TYPE:
|
shape |
shape of well
TYPE:
|
depth |
well depth
TYPE:
|
volume |
volume of contents in well
TYPE:
|
capacity |
total liquid capacity
TYPE:
|
dimensions |
dimensions of base in mm
TYPE:
|
base_area |
base area of well in mm^2
TYPE:
|
level |
height level of contents in well
TYPE:
|
METHOD | DESCRIPTION |
---|---|
fromBottom |
offset from bottom of well |
fromMiddle |
offset from middle of well |
fromTop |
offset from top of well |
fromBottom
Offset from bottom of well
PARAMETER | DESCRIPTION |
---|---|
offset
|
x,y,z offset
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple
|
bottom of well with offset
TYPE:
|
fromMiddle
Offset from middle of well
PARAMETER | DESCRIPTION |
---|---|
offset
|
x,y,z offset
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple
|
middle of well with offset
TYPE:
|
convert_to_position
convert_to_position(value: Sequence | ndarray) -> Position
get_transform
get_transform(
initial_points: ndarray, final_points: ndarray
) -> tuple[Position, float]
Get transformation matrix from initial to final points, with the first point in each set being the center of rotation.
PARAMETER | DESCRIPTION |
---|---|
initial_points
|
initial points
TYPE:
|
final_points
|
final points
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[Position, float]
|
tuple[Position,float]: transformation Position (i.e. vector and rotation) and scale factor |