pylabrobot.resources.hamilton.hamilton_decks.HamiltonDeck.assign_child_resource#
- HamiltonDeck.assign_child_resource(resource: Resource, location: Coordinate | None = None, reassign: bool = False, rails: int | None = None, replace=False)#
Assign a new deck resource.
The identifier will be the Resource.name, which must be unique amongst previously assigned resources.
Note that some resources, such as tips on a tip carrier or plates on a plate carrier must be assigned directly to the tip or plate carrier respectively. See TipCarrier and PlateCarrier for details.
Based on the rails argument, the absolute (x, y, z) coordinates will be computed.
- Parameters:
resource (Resource) – A Resource to assign to this liquid handler.
location (Coordinate | None) – The location of the resource relative to the liquid handler. Either rails or location must be
None
, but not both.reassign (bool) – If True, reassign the resource if it is already assigned. If False, raise a
ValueError
if the resource is already assigned.rails (int | None) – The left most real (inclusive) of the deck resource (between and 0-30 for STARLet, max 55 for STAR.) Either rails or location must be None, but not both. 1-index similar to markings on the device, but you can place carriers on 0 as well (left support will not touch a support rail).
location – The location of the resource relative to the liquid handler. Either rails or location must be None, but not both.
replace – Replace the resource with the same name that was previously assigned, if it exists. If a resource is assigned with the same name and replace is False, a ValueError will be raised.
- Raises:
ValueError – If a resource is assigned with the same name and replace is
False
.