science_jubilee.decks.Deck#
Classes#
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:
WellSetA 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
Labwareobject 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
RowandColumnandWellobjects from the data in the config .json file.- Returns:
A dictionary of
RowandColumnandWellobjects- Return type:
Row,Column,Well
- get_row(row_id: str) Row[source]#
Fucntions to fetch the
Well.nameof 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
Wellobjects diplayed by their :attribute:`Well.name`- Return type:
Row
- get_column(col_id: int) Column[source]#
Fucntions to fetch the
Well.nameof 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
Wellobjects diplayed by their :attribute:`Well.name`- Return type:
Column
- property shape#
- Returns the shape of the labware as a tuple of (rows, columns)
- 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.nameobjects- 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:
- 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
Labwareobject.- Returns:
A dictionary with the metadata of the labware
- Return type:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- property load_name#
- Returns the name of the labware as a string
- Returns:
A string with the name of the labware
- Return type:
- 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:
- 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:
- 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
Wellobjects diplayed by their :attribute:`Well.name`- Return type:
- _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.
- 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.
- load_manualOffset(apply: bool = True)[source]#
Loads the manual offset of a labware from its config .json file for a specific slot
- 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 aLocationobject- Raises:
ValueError – If the location is not a
Well, atuple, or aLocationobject- Returns:
The x, y, z coordinates of the location
- Return type:
- 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) – TheLabwareobject that has been loaded into the slot.
- class science_jubilee.decks.Deck.SlotSet[source]#
Class that defines a set of slots on the Jubilee deck.
- Parameters:
- class science_jubilee.decks.Deck.Deck(deck_filename, path: str = os.path.join(os.path.dirname(__file__), 'deck_definition'))[source]#
Bases:
SlotSetClass 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:
- _get_slots()[source]#
Function that creates a dictionary of
Slotobjects from the deck configuration file.
- 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:
- 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:
- 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:
- 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:
- property deck_material[source]#
- Function that returns the material that the deck and possible mask are made of.
- 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:
- 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
Labwareobject that has been loaded into the slot.- Return type: