pylabrobot.resources.TubeRack.get_anchor

pylabrobot.resources.TubeRack.get_anchor#

TubeRack.get_anchor(x: str, y: str, z: str) Coordinate#

Get a relative location within the resource.

Parameters:
  • x (str) – "l"/"left", "c"/"center", or "r"/"right"

  • y (str) – "b"/"back", "c"/"center", or "f"/"front"

  • z (str) – "t"/"top", "c"/"center", or "b"/"bottom"

Returns:

A relative location within the resource, the anchor point wrt the left front bottom corner.

Return type:

Coordinate

Examples

>>> r = Resource("resource", size_x=12, size_y=12, size_z=12)
>>> r.get_anchor("l", "b", "t")

Coordinate(x=0.0, y=12.0, z=12.0)

>>> r.get_anchor("c", "c", "c")

Coordinate(x=6.0, y=6.0, z=6.0)

>>> r.get_anchor("r", "f", "b")

Coordinate(x=12.0, y=0.0, z=0.0)