following a recent discussion with @CamilloMoschner
so that we know what we’re talking about:
- base:
- plate module:
- tip rack module:
-
- tilt module:
all go on the base. it’s a user-configurable carrier
current implementation
the carrier base has CarrierSite
s as children, which have MFXModule
s as children. The tree is like this: carrier (base) > carriersite > mfxmodule > plate.
>>> base = MFX_CAR_L5_base(name='base')
>>> base[0]
CarrierSite
>>> base[0] = DWP_module_1 = MFX_DWP_rackbased_module(name="dwp1")
>>> base[1] = DWP_module_2 = MFX_DWP_rackbased_module(name="dwp2")
>>> # assigning a plate
>>> DWP_module_1.assign_child_resource(plate)
proposed: initialize with sites, __getitem__
returns an MFXModule
>>> # at initialization, pass sites to the carrier base
>>> mfx_carrier = MFX_CAR_base_L5(sites={
... 0: mfx_deep_well_site(),
... 1: tilter(),
... 3: mfx_tip_rack_site()
... })
>>> mfx_carrier[0]
PlateCarrierSite(location=Coordinate(0, 1, 0), size_z = 500)
>>> mfx_carrier[1]
Tilter(location=Coordinate(0, 2, 0), size_z = 600)
>>> mfx_carrier[2]
CarrierSite(location=Coordinate(0, 3, 0), size_z = 400)
propposed: remove MFXModule
class, replace with CarrierSite
and CarrierSite
ResourceHolderMixin
The mfx modules can be devided into:
- plate sites
- tip rack sites
- machines (like tilter, heater shaker)
It seems we don’t need a class besides (Plate)CarrierSite and Machine to model these. I propose removing the MFXModule class (which is very similar in implementation to CarrierSite) and replacing the plate modules with PlateCarrierSite, tip rack sites with CarrierSite (as in TipCarrier) and the Tilter/HeaterShaker simply with Machine+ResourceHolderMixin.
eg
def mfx_deep_well_site() -> PlateCarrierSite:
return PlateCarrierSite(
size_x,y,z = physical dim of module
child_location = where plate would go
)
depending on how you view it, it’s a bit of a shift compared to how CarrierSite is treated currently. Currently, it’s a guiding resource that one could argue is purely abstract (the size_z is always 0). With this change, they would, certainly in the case of mfx carriers, become physical objects with a size in all 3d dimensions.