pylabrobot.resources.utils.create_ordered_items_2d#
- pylabrobot.resources.utils.create_ordered_items_2d(klass: Type[T], num_items_x: int, num_items_y: int, dx: float, dy: float, dz: float, item_dx: float, item_dy: float, **kwargs) Dict[str, T] #
Make ordered resources in a 2D grid, with the keys being the identifiers in transposed MS-Excel style. This is useful for initializing
ItemizedResource
.- Parameters:
klass (Type[T]) – The class of the resource to create
num_items_x (int) – The number of items in the x direction
num_items_y (int) – The number of items in the y direction
dx (float) – The bottom left corner for items in the left column wrt the parent
dy (float) – The bottom left corner for items in the bottom row wrt the parent
dz (float) – The z coordinate for all items
item_dx (float) – The spacing of the items in the x direction (center to center)
item_dy (float) – The spacing of the items in the y direction (center to center)
**kwargs – Additional keyword arguments to pass to the resource constructor
- Returns:
A dict of resources. The keys are the identifiers in transposed MS-Excel format, so the top left item is “A1”, the item to the bottom is “B1”, the item to the right is “A2”, and so on.
- Return type: