pylabrobot.resources.hamilton.hamilton_decks.HamiltonDeck.assign_child_resource#

HamiltonDeck.assign_child_resource(resource: Resource, location: Coordinate | None = None, reassign: bool = False, track: int | None = None, rails: int | None = None, replace=False, ignore_collision=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.

Given a track, the absolute (x, y, z) coordinates are computed from it.

Parameters:
  • resource (Resource) – A Resource to assign to this liquid handler.

  • location (Coordinate | None) – Where to put it, relative to this deck. Either this or track, 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.

  • track (int | None) – The leftmost track the resource covers, counted from 1 as the markings on the device are, and down to -4 for the supports left of the first one. Either this or location, not both.

  • rails (int | None) – Deprecated, use track.

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

  • ignore_collision – If True, ignore collision detection.

Raises:

ValueError – If a resource is assigned with the same name and replace is False.