science_jubilee.decks.Deck#

Classes#

Labware

A class representing a basic laboratory labware made up of a set of wells/pipette tips.

Slot

Class that defines a slot on the Jubilee deck.

SlotSet

Class that defines a set of slots on the Jubilee deck.

Deck

Class that defines the Jubilee deck.

Module Contents#

class science_jubilee.decks.Deck.Labware(labware_filename: str, offset: Tuple[float] = None, order: str = 'rows', path: str = os.path.join(os.path.dirname(__file__), 'labware_definition'))[source]#

Bases: WellSet

A class representing a basic laboratory labware made up of a set of wells/pipette tips.

Parameters:
  • labware_filename (str) – The name of the config .json

  • offset (Tuple[float], optional) – Coordinates to use to offset all the wells in a labware for easier handling of coordinates. For example this is called by the :method:`Deck.load_labware` when assignign a labware to a deck slot, defaults to None

  • order (str, optional) – Option to order the wells of a labware either by row or columns, defaults to ‘rows’

  • path (str, optional) – Path to the folder containing the configuration .json files for the labware, defaults to the ‘labware_definition/’ in the science_jubilee/labware directory.

__repr__()[source]#

Displayed representation of a Labware object indicating the type of labware and its name. Additionally, it will show the :attribute:`Deck.slots` number if the labware has been already assigned to it.

_create_rows_and_columns()[source]#

Creates a dictionary of Row and Column and Well objects from the data in the config .json file.

Returns:

A dictionary of Row and Column and Well objects

Return type:

Row, Column, Well

get_row(row_id: str) Row[source]#

Fucntions to fetch the Well.name of the indicated row.

Parameters:

row_id (str) – The name of a row of the labware, usually indicated by a capital letter (e.g., A, B, etc.)

Returns:

A list of Well objects diplayed by their :attribute:`Well.name`

Return type:

Row

get_column(col_id: int) Column[source]#

Fucntions to fetch the Well.name of the indicated column.

Parameters:

col_id (str) – The name of a column of the labware, usually indicated by an integer number (e.g., 1, 2, etc.)

Returns:

A list of Well objects diplayed by their :attribute:`Well.name`

Return type:

Column

property shape#
Returns the shape of the labware as a tuple of (rows, columns)
Returns:

A tuple of (rows, columns)

Return type:

Tuple[int, int]

property ordering: List[List[str]]#

Returns the ordering of the wells in the labware as a list of lists. Each list represents a row of the labware.

Returns:

A list of lists of Well.name objects

Return type:

List[List[str]]

property brand: dict#

Returns the brand of the labware as a strin

Returns:

A string with the brand of the labware

Return type:

str

metadata() dict[source]#

Returns the metadata of the labware as a dictionary

The metadata of a labware will generally contain the display name, the type of labware, and the units of volume. These can also be found as attributes of the Labware object.

Returns:

A dictionary with the metadata of the labware

Return type:

dict

property display_name#
Returns the display name of the labware as a string
Returns:

A string with the display name of the labware

Return type:

str

property labware_type#
Returns the type of labware as a string

The type fo labware will generally either be a tiprack, wellplate, reservoir, etc.

Returns:

A string with the type of labware

Return type:

str

property volume_units#
Returns the units of volume of the labware as a string

The volume units will be either uL or mL.

Returns:

A string with the units of volume of the labware

Return type:

str

property dimensions: dict#

Returns the dimensions of the labware as a dictionary

Returns:

A dictionary with the x,y, and z dimensions of the labware

Return type:

dict

parameters() dict[source]#

Returns the parameters describing certain features of the labware as a dictionary

The parameters genereally include whether the shape of the labware is regular or irregular, if it is a tiprack, and other Opentrons specific parameters as we are using their ‘Custom Labware Page’ to generate the .json config files.

Returns:

A dictionary with the parameters of the labware

Return type:

dict

property is_tip_rack#
Returns a boolean indicating if the labware is a tiprack
Returns:

True if the labware is a tiprack, False otherwise

Return type:

bool

property load_name#
Returns the name of the labware as a string
Returns:

A string with the name of the labware

Return type:

str

property tip_length#
Returns the length of the tip of the labware as a float if the labware is a tiprack, otherwise returns None
Returns:

A float with the length of the tip of the labware or None otherwise

Return type:

float

property tip_overlap#
Returns the overlap of the tip of the labware as a float if the labware is a tiprack, otherwise returns None
Returns:

A float with the overlap of the tip of the labware or None otherwise

Return type:

float

property offset#
Returns the offset of the labware as a tuple of floats
Returns:

A tuple of floats with the offset of the labware

Return type:

Tuple[float]

add_slot(slot_)[source]#

Add name of deck slot after labware has been loaded

Parameters:

slot (str) – The name of the deck slot

withWellOrder(order) list[source]#

Reorders the wells by rows or by columns. Automatically updates the :attribute:`Labware.wells`

Parameters:

order (str) – The order in which to reorder the wells. Can be either ‘rows’ or ‘columns’

Returns:

A list of Well objects diplayed by their :attribute:`Well.name`

Return type:

list

_translate_point(well: Well, theta: float, x_space: float, y_space: float, upper_left: Tuple[float])[source]#

Helper function to translate the coordinates of a well by a given angle theta.

Parameters:
  • well (Well) – A Well object

  • theta (float) – The angle by which to translate the coordinates of the well

Returns:

The new x and y coordinates of the well

Return type:

float, float

static _nominal_coordinates(well: Well, x_space: float, y_space: float)[source]#

Helper function to calculate the nominal coordinates of a well in a labware based on its row and column index.

manual_offset(corner_wells: List[Tuple[float]], save: bool = False)[source]#

Allows the user to manually offset the coordinates of the labware based on three corner wells.

Adapted from https://github.com/machineagency/sonication_station labware calibration procedure.

Parameters:
  • offset (Tuple[float]) – A list containing tuples of floats

  • save (bool, optional) – Option to save the manual offset to the original config .json file, defaults to False

Returns:

An updated Labware object with the new coordinates of the wells

Return type:

Labware

load_manualOffset(apply: bool = True)[source]#

Loads the manual offset of a labware from its config .json file for a specific slot

Parameters:

apply (bool, optional) – Option to apply the manual offset to the labware or return values, defaults to False

Returns:

A list of tuples containing the manual offset of the labware

Return type:

List[Tuple[float]]

static _getxyz(location: Well | Tuple | Location)[source]#

Helper function to extract the x, y, z coordinates of a location object.

Parameters:

location (Union[Well, Tuple, Location]) – The location object to extract the coordinates from. This can either be a Well, a :tuple: of x, y, z coordinates, or a Location object

Raises:

ValueError – If the location is not a Well, a tuple, or a Location object

Returns:

The x, y, z coordinates of the location

Return type:

float, float, float

class science_jubilee.decks.Deck.Slot[source]#

Class that defines a slot on the Jubilee deck. Each slot has a unique index, offset, and can have a labware associated with it.

Parameters:
  • slot_index (int) – The unique index of the slot, usually a number between 0 and 5.

  • offset (Tuple[float]) – The (x,y) offset of the slot from the origin of the deck/machine.

  • has_labware (bool) – A boolean that indicates whether a labware has been loaded into the slot.

  • labware (Labware) – The Labware object that has been loaded into the slot.

slot_index: int[source]#
offset: Tuple[float][source]#
has_labware: bool[source]#
labware: str[source]#
class science_jubilee.decks.Deck.SlotSet[source]#

Class that defines a set of slots on the Jubilee deck.

Parameters:
  • slots (Dict[str, Slot]) – A dictionary of Slot objects, where the key is the slot’s index.

  • bedType (str) – The type of bed that the slots are arranged in. Usually ‘fixed’ or ‘removable’.

slots: Dict[str, Slot][source]#
__repr__()[source]#

Return repr(self).

__getitem__(id_)[source]#

Allows the user to select a Slot object by its index or key.

Parameters:

id (str or int) – The index or key representing the slot.

Returns:

The Slot object associated with the index or key.

Return type:

Slot

class science_jubilee.decks.Deck.Deck(deck_filename, path: str = os.path.join(os.path.dirname(__file__), 'deck_definition'))[source]#

Bases: SlotSet

Class that defines the Jubilee deck.

The deck is a set of slots that can have labware loaded into them. The deck is defined by a configuration file that specifies the number of slots, their offsets, and the type of bed they are arranged in.

Parameters:
  • deck_filename (str) – The name of the deck configuration file.

  • path (str, optional) – The path to the deck configuration .json files for the labware, defaults to the ‘deck_definition/’ in the science_jubilee/decks directory.

_get_slots()[source]#

Function that creates a dictionary of Slot objects from the deck configuration file.

Returns:

A dictionary of Slot objects, where the key is the slot’s index.

Return type:

Dict[str, Slot]

property bedType[source]#
Function that returns the type of bed loaded onto Jubilee.
Returns:

The name/type of deck loaded onto Jubilee, e.g., Lab Automation Deck, Heated Deck, etc.

Return type:

str

property totalslots[source]#
Function that returns the total number of slots on the deck.
Returns:

The total number of slots on the deck.

Return type:

int

property slotType[source]#
Function that returns the type of slot arrangement the deck might have.
Returns:

The slot arrangement type. This is inidcated in the configuration file. Standard is “SLAS”.

Return type:

str

property offsetFrom[source]#
Function that returns which corner or the slot to apply to a labware loaded on it.
Returns:

The corner of the slot to apply to the labware. This is inidcated in the configuration file.

Return type:

str

property deck_material[source]#
Function that returns the material that the deck and possible mask are made of.
Returns:

The material that the deck is made of, as well as any mask that is applied to it.

Return type:

Dict[str, str]

property safe_z[source]#
Function that returns the movement clearance height of the deck.
Returns:

The height at which the pipette can freely move without colliding with labware on the deck.

Return type:

float

load_labware(labware_filename: str, slot: int, path=os.path.join(os.path.dirname(__file__), '..', 'labware', 'labware_definition'), order: str = 'rows')[source]#
Function that loads a labware and associates it with a specific slot on the deck.

The slot offset is also applied to the labware asocaite with it.

Parameters:
  • labware_filename (str) – The name of the labware configuration file.

  • slot (int) – The index of the slot to load the labware into.

  • path (str, optional) – The path to the labware configuration .json files for the labware, defaults to the ‘labware_definition/’ in the science_jubilee/labware directory.

  • order (str, optional) – The order in which the labware is arranged on the deck. Can be ‘rows’ or ‘columns’, defaults to ‘rows’.

Returns:

The Labware object that has been loaded into the slot.

Return type:

Labware