science_jubilee.labware package#

Submodules#

science_jubilee.labware.Labware module#

class science_jubilee.labware.Labware.Column(wells: Dict[str, Well], identifier: int)[source]#

Bases: WellSet

A class representing a column of a labware, for example 1, 2, etc.

Parameters:

WellSet (Dict[str, Well]) – A dictionary of Well objects in which each keys is the the :attribute:`Well.name` object and the value is the Well object itself.

identifier: int[source]#
class science_jubilee.labware.Labware.Labware(labware_filename: str, offset: Tuple[float] = None, order: str = 'rows', path: str = '/home/docs/checkouts/readthedocs.org/user_builds/science-jubilee/checkouts/latest/docs/../src/science_jubilee/labware/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.

add_slot(slot_)[source]#

Add name of deck slot after labware has been loaded

Parameters:

slot (str) – The name of the deck slot

property brand: dict[source]#

Returns the brand of the labware as a strin

Returns:

A string with the brand of the labware

Return type:

str

property dimensions: dict[source]#

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

property display_name[source]#

Returns the display name of the labware as a string

Returns:

A string with the display name of the labware

Return type:

str

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

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

property is_tip_rack[source]#

Returns a boolean indicating if the labware is a tiprack

Returns:

True if the labware is a tiprack, False otherwise

Return type:

bool

property labware_type[source]#

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

static list_labware_definitions()[source]#

Returns a list of all the labware definitions available in the labware_definition folder.

Returns:

A list of all the labware definitions available

Return type:

List[str]

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]]

property load_name[source]#

Returns the name of the labware as a string

Returns:

A string with the name of the labware

Return type:

str

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

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 offset[source]#

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]

property ordering: List[List[str]][source]#

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]]

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 shape[source]#

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

Returns:

A tuple of (rows, columns)

Return type:

Tuple[int, int]

property tip_length[source]#

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[source]#

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 volume_units[source]#

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

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

class science_jubilee.labware.Labware.Location(point: Point, labware: Well | Labware)[source]#

Bases: object

A location to target as a motion.

The location contains a Point and possibly an associated Labware or Well instance.

property labware[source]#

The Well object associated with the coordinates (x,y,z)

Returns:

A Well object

Return type:

Well

property point: Point[source]#

The coordinates (x,y,z) of a Well or a Labware

Returns:

A tuple of coordinates (x,y,z)

Return type:

Point

class science_jubilee.labware.Labware.Point(x: float = 0.0, y: float = 0.0, z: float = 0.0)[source]#

Bases: NamedTuple

A point in the Jubilee 3D coordinate system.

Parameters:

NamedTuple (NamedTuple) – A list-like container with a fixed number of elements

Returns:

A tuple of coordinates (x,y,z)

Return type:

Point

absolute()[source]#

Returns the absolute value of the coordinates of a point.

Returns:

The absolute values of a Point object

Return type:

Point

add(other)[source]#

Adds the coordinates of two points

Parameters:

other (Point) – A tuple of coordinates (x,y,z)

Returns:

A new Point object

Return type:

Point

multiply(other: int | float)[source]#

Multiplies the coordinates of a point by a scalar

Parameters:

other (Union[int, float]) – A scalar to multiply the coordinates of a point

Returns:

A new Point object scaled by the value indicated as the function parameter

Return type:

Point

substract(other)[source]#

Substracts the coordinates of two points

Parameters:

other (Point) – A tuple of coordinates (x,y,z)

Returns:

A new Point object

Return type:

Point

x: float[source]#

Alias for field number 0

y: float[source]#

Alias for field number 1

z: float[source]#

Alias for field number 2

class science_jubilee.labware.Labware.Row(wells: Dict[str, Well], identifier: str)[source]#

Bases: WellSet

A class representing a row of a labware, for example ‘A’, ‘B’, etc

Parameters:

WellSet (Dict[str, Well]) – A dictionary of Well objects in which each keys is the the :attribute:`Well.name` object and the value is the Well object itself.

identifier: str[source]#
class science_jubilee.labware.Labware.Well(name: str, depth: float, totalLiquidVolume: float, shape: str, diameter: float = None, xDimension: float = None, yDimension: float = None, x: float = <property object>, y: float = <property object>, z: float = <property object>, offset: Tuple[float] = None, slot: int = None, has_tip: bool = False, clean_tip: bool = False, labware_name: str = None)[source]#

Bases: object

A class representing a well of a labware.

Each Well is associated with a specific name, depth, total liquid volume, shape, diameter, x, y, and z dimension, y-dimension, as well as its coordinates and any applied offset

Returns:

A Well object with various information about the geometry of the well and its position in the labware

Return type:

Well

apply_offset(offset: Tuple[float])[source]#

Allows the user to offset the coordinates of the well with respect to the deck-slot coordinates

Parameters:

offset (Tuple[float]) – A tuple of floats with the new offset of the well

bottom(z: float, check=False)[source]#

Allows the user to dinamically indicate a new Z location relative to the bottom of the well.

Parameters:
  • z (float) – the distance in mm to offset the coordinates from the bottom of the well. Should be +

  • check (bool, optional) – the ‘z’ parameters can either be + or -. If negative, an assert error is raised to avoid collision with the labware. However, there might be instances of custom labware where the bottom of the well is purposely set as higher during the generation of its config .json file., defaults to False

Returns:

A Location which contains information about the new coordinates generated and the Well object

Return type:

Location

property bottom_[source]#

Defines the bottom-most point of the well

Returns:

The z-coordinate of the bottom of the well

Return type:

float

clean_tip: bool = False[source]#
depth: float[source]#
diameter: float = None[source]#
has_tip: bool = False[source]#
labware_name: str = None[source]#
name: str[source]#
offset: Tuple[float] = None[source]#
set_clean_tip(value: bool)[source]#

Returns the value of the clean_tip attribute.

Parameters:

value (bool) – The new value for the clean_tip attribute

set_has_tip(value: bool)[source]#

Set the value of the has_tip attribute.

Parameters:

value (bool) – The new value for the has_tip attribute

shape: str[source]#
slot: int = None[source]#
top(z: float)[source]#

Allows the user to dinamically indicate a new Z location relative to the top of the well.

Parameters:

z (float) – the distance in mm to offset the coordinates from the top of the well.Can be either + or -

Returns:

A Location which contains information about the new coordinates generated and the Well object.

Return type:

Location

property top_[source]#

Defines the top-most point of the well

Returns:

The z-coordinate of the top of the well

Return type:

float

totalLiquidVolume: float[source]#
property x[source]#

Offsets the x-position of the each well with respect to the deck-slot coordinates

Returns:

The x-coordinate of the well

Return type:

float

xDimension: float = None[source]#
property y[source]#

Offsets the y-position of the each well with respect to the deck-slot coordinates

Returns:

The y-coordinate of the well

Return type:

float

yDimension: float = None[source]#
property z[source]#

Offsets the z-position of each well with respect to the deck-slot coordinates

Returns:

The z-coordinate of the well

Return type:

float

class science_jubilee.labware.Labware.WellSet(wells: Dict[str, Well])[source]#

Bases: object

A class defining a set of wells expressed as a dictionary in which each keys is the the :attribute:`Well.name` object and the value is the Well object itself.

wells: Dict[str, Well][source]#

Module contents#