pylabrobot.utils.positions.string_to_position#

pylabrobot.utils.positions.string_to_position(position_string: str) Tuple[int, int]#

Convert a string to a list of patterns.

Positions are formatted as <row><column> where <row> is the row string (A for row 1, B for row 2, etc.) and <column> is the column number. For example, A1 is the top left corner of the resource and H12 is the bottom right. This method returns the index for such a position.

Examples

>>> _string_to_pattern("A1")
(0, 0)
>>> _string_to_pattern("A3")
(0, 2)
>>> _string_to_pattern("C1")
(2, 0)
Parameters

position_string (str) – The string to convert.

Returns

A list of patterns.

Return type

Tuple[int, int]