Importing standard labware
The labware sub-package 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/plates/corning_costar and carriers from Hamilton are found under labware/carriers/hamilton. Importing the tip carrier TIP_CAR_480_A00 from Hamilton is done with the following code:
from unitelabs.labware.carriers.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.plates.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.carriers 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.carriers.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=135.0, y=497.0, z=130.0) # .dimension
130.0 497.0 135.0 # .height, .depth, .width
None # .location
Vector(x=0, y=0, z=0) # .absolute_location
0 # .rotation
6 # .tracks
1 # .cols
5 # .rows
[CarrierSite(identifier='48c01277-c7b7-4873-b648-e11280945d42', rotation=0, dimensions=Vector(x=127.0, y=86.0, z=0),
location=Vector(x=4.0, y=8.5, z=111.75), capacity=1), CarrierSite(identifier='9e4ebd33-75a9-423c-9047-a8607867f6b5',
rotation=0, dimensions=Vector(x=127.0, y=86.0, z=0), location=Vector(x=4.0, y=104.5, z=111.75), capacity=1),
CarrierSite(identifier='61b8a6ba-d96a-4428-a806-569cd7a47a32', rotation=0, dimensions=Vector(x=127.0, y=86.0, z=0),
location=Vector(x=4.0, y=200.5, z=111.75), capacity=1), CarrierSite(identifier='d0260314-5164-4761-bcd6-03ba3ba6fe9d',
rotation=0, dimensions=Vector(x=127.0, y=86.0, z=0), location=Vector(x=4.0, y=296.5, z=111.75), capacity=1),
CarrierSite(identifier='02f9e708-9731-4b87-8a99-eb6f2dbca21f', rotation=0, dimensions=Vector(x=127.0, y=86.0, z=0),
location=Vector(x=4.0, y=392.5, z=111.75), capacity=1)]
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 the deck. 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.