pylabrobot.resources.hamilton.hamilton_decks.HamiltonDeck.assign_child_resource

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 1-30 for STARLet, max 55 for STAR.) Either rails or location must be None, but not both.

  • 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.