in work to remove hamilton liquid classes from pylabrobot (background in issue remove Hamilton liquid classes · Issue #225 · PyLabRobot/pylabrobot · GitHub), i was adding a new class ParameterSet
(add ParameterSet by rickwierenga · Pull Request #248 · PyLabRobot/pylabrobot · GitHub), because liquid classes are essentially just parameters. ParameterSet
is an abstract base class that generates parameters for an aspiration or a dispense. These parameters can then be passed to LiquidHandler.aspirate and dispense. Robot-specific arguments will be passed through backend_kwargs
.
For each robot, the parameters sets (“liquid classes”) are different, and so each robot may define a subclass of ParameterSet. Users may also only want to customize some parameters, so also users should be free to define ParameterSet subclasses so that they can just include attributes for parameters they want. For STAR, I created STARParameterSet, with similar attributes to a hamilton liquid class.
Each channel may liquid handling operation with different parameters (such as flow rate). Given this, it makes sense to store the parameters on STARParameterSet in lists.
It got interesting when I was just implementing this for {aspirate,dispense}96
commands. At least on hamilton, they take a single parameter that applies to all channels. This means STARParameterSet will not work naturally, I would have to check that there is only a single value in each list. It’s possible to introduce a second class STARCore96ParameterSet.
Thinking about this, I don’t think it really makes sense to have this class. It provides nothing not even a defined set of attributes and data types (all is user defined). Is there any reason to not only use dictionaries? The user can store
asp_kwargs = {
"flow_rates": [21, 42],
...
}
and simply lh.aspirate(..., **asp_kwargs)
. I don’t really see why we would need ParameterSet.