Importing standard labware
The labware library contains many pre-defined labware types and base classes to create custom labware. It contains standard labware for the following labware types:
- carriers
- plates
- tubes
- troughs
- tips
Racks and lids are always part of the respective labware sub-package, i.e. tube racks can be found in the tubes section and plate lids are described in the plates section. Vendor-specific pre-defined labware classes are contained in a separate vendor sub-package, i.e. plates from Corning-Costar are in labware/corning_costar and carriers from Hamilton are found under labware/hamilton. Importing the tip carrier TIP_CAR_480_A00 from Hamilton is done with the following code:
from unitelabs.labware.hamilton import TIP_CAR_480_A00
In the same way, importing the 96-well flat bottom microplates from Corning-Costar looks like this:
from unitelabs.labware.corning_costar import Cos_96_FB
You can always check which labware is available within a subpackage by using the all property:
from unitelabs.labware import hamilton
print(hamilton.__all__)
Which will return all implemented Hamilton carriers as well as the base class:
[
'HamiltonCarrier',
'LabwareType',
'Orientation',
'PLT_CAR_L4HD',
'PLT_CAR_L5AC',
'PLT_CAR_L5AC_A00',
'PLT_CAR_L5FLEX_AC',
'PLT_CAR_L5FLEX_AC_A00',
'PLT_CAR_L5FLEX_MD',
'PLT_CAR_L5FLEX_MD_A00',
'PLT_CAR_L5MD',
'PLT_CAR_L5MD_A00',
'PLT_CAR_L5PCR_A00',
'PLT_CAR_L5PCR_A01',
'PLT_CAR_P3AC_A00',
'PLT_CAR_P3AC_A01',
'PLT_CAR_P3HD',
'PLT_CAR_P3MD',
'PLT_CAR_P3MD_A00',
'PLT_CAR_P3MD_A01',
'TIP_CAR_288_A00',
'TIP_CAR_288_B00',
'TIP_CAR_288_C00',
...
]
After importing a labware class, you can instantiate it. Using the dir( ... )
build-in function, all available properties and methods can be viewed. A selection is shown below:
from unitelabs.labware.hamilton import PLT_CAR_L5MD_A00
plate_carrier_1 = PLT_CAR_L5MD_A00()
print(plate_carrier_1.dimensions)
print(plate_carrier_1.height, plate_carrier_1.depth, plate_carrier_1.width)
print(plate_carrier_1.location)
print(plate_carrier_1.absolute_location)
print(plate_carrier_1.rotation)
print(plate_carrier_1.tracks)
print(plate_carrier_1.cols)
print(plate_carrier_1.rows)
print(plate_carrier_1.children)
This yields the following output:
Vector(x=Decimal('135'), y=Decimal('497'), z=Decimal('130')) # .dimension
130 497 135 # .height, .depth, .width
None # .location
Vector(x=Decimal('0'), y=Decimal('0'), z=Decimal('0')) # .absolute_location
0 # .rotation
6 # .tracks
1 # .cols
5 # .rows
[
CarrierSite(identifier='81625615', rotation=0, dimensions=Vector(x=Decimal('127'), y=Decimal('86'), z=Decimal('0')), location=Vector(x=Decimal('4'), y=Decimal('392.5'), z=Decimal('111.75')), orientation=<Orientation.LANDSCAPE: 'LANDSCAPE'>),
CarrierSite(identifier='90e13a32', rotation=0, dimensions=Vector(x=Decimal('127'), y=Decimal('86'), z=Decimal('0')), location=Vector(x=Decimal('4'), y=Decimal('296.5'), z=Decimal('111.75')), orientation=<Orientation.LANDSCAPE: 'LANDSCAPE'>),
CarrierSite(identifier='0e66b837', rotation=0, dimensions=Vector(x=Decimal('127'), y=Decimal('86'), z=Decimal('0')), location=Vector(x=Decimal('4'), y=Decimal('200.5'), z=Decimal('111.75')), orientation=<Orientation.LANDSCAPE: 'LANDSCAPE'>),
CarrierSite(identifier='d16d85e1', rotation=0, dimensions=Vector(x=Decimal('127'), y=Decimal('86'), z=Decimal('0')), location=Vector(x=Decimal('4'), y=Decimal('104.5'), z=Decimal('111.75')), orientation=<Orientation.LANDSCAPE: 'LANDSCAPE'>),
CarrierSite(identifier='b2b1ced8', rotation=0, dimensions=Vector(x=Decimal('127'), y=Decimal('86'), z=Decimal('0')), location=Vector(x=Decimal('4'), y=Decimal('8.5'), z=Decimal('111.75')), orientation=<Orientation.LANDSCAPE: 'LANDSCAPE'>)
]
When instantiated, labware does not have a location yet. Labware can be added to a deck or other labware. The location will then be calculated relative to its parent. More on deck building is explained in the Building a deck guide.
Labware can be custom-made using the base classes provided. More on custom labware is explained in the Creating custom labware guide.