pylabrobot.resources.ItemizedResource.__init__

pylabrobot.resources.ItemizedResource.__init__#

ItemizedResource.__init__(name: str, size_x: float, size_y: float, size_z: float, ordered_items: Dict[str, T] | None = None, ordering: List[str] | None = None, items: List[List[T]] | None = None, num_items_x: int | None = None, num_items_y: int | None = None, category: str | None = None, model: str | None = None)#

Initialize an itemized resource

Parameters:
  • name (str) – The name of the resource.

  • size_x (float) – The size of the resource in the x direction.

  • size_y (float) – The size of the resource in the y direction.

  • size_z (float) – The size of the resource in the z direction.

  • ordered_items (Dict[str, T] | None) – The items on the resource, along with their identifier (as keys). See pylabrobot.resources.create_ordered_items_2d(). If this is specified, ordering must be None. Keys must be in transposed MS Excel style notation, e.g. “A1” for the first item, “B1” for the item below that, “A2” for the item to the right, etc.

  • ordering (List[str] | None) – The order of the items on the resource. This is a list of identifiers. If this is specified, ordered_items must be None. See ordered_items for the format of the identifiers.

  • items (List[List[T]] | None) – Deprecated.

  • num_items_x (int | None) – Deprecated.

  • num_items_y (int | None) – Deprecated.

  • category (str | None) – The category of the resource.

  • model (str | None)

Examples

Creating a plate with 96 wells with pylabrobot.resources.create_ordered_items_2d():

>>> from pylabrobot.resources import Plate
>>> plate = Plate("plate", size_x=1, size_y=1, size_z=1,
...   ordered_items=create_ordered_items_2d(Well
...     dx=0, dy=0, dz=0, item_size_x=1, item_size_y=1,
...     num_items_x=1, num_items_y=1))

Creating a plate with 1 Well in a dict:

>>> from pylabrobot.resources import Plate
>>> plate = Plate("plate", size_x=1, size_y=1, size_z=1,
...   ordered_items={"A1": Well("well", size_x=1, size_y=1, size_z=1)})