AFL.automation.mixing.OT2Prepare#

Functions

listify(obj)

Classes

Any(*args, **kwargs)

Special type indicating an unconstrained type.

MassBalance([name, minimum_volume])

MassBalanceDriver([overrides])

OT2HTTPDriver([overrides])

OT2Prepare([overrides])

PipetteAction(source, dest, volume[, ...])

Solution(name[, total_mass, total_volume, ...])

class AFL.automation.mixing.OT2Prepare.OT2Prepare(overrides=None)[source]#
defaults = {'catch_volume': '10 ul', 'deck': {}, 'fixed_compositions': {}, 'mixing_locations': [], 'prepare_volume': '100 ul', 'stock_locations': {}, 'stock_mix_order': [], 'stock_transfer_params': {}, 'stocks': []}#
__init__(overrides=None)[source]#
status()[source]#

Get the status of the OT2Prepare driver.

is_feasible(targets: dict | list[dict]) list[dict | None][source]#

Check if the target composition(s) is/are feasible for preparation using mass balance. If feasible, returns the balanced target solution dictionary. Otherwise, returns None.

This implementation creates a local MassBalance instance for each feasibility check to avoid modifying the driver’s state.

Parameters:

targets (Union[dict, List[dict]]) – Either a single target dictionary or a list of target dictionaries.

Returns:

A list containing the balanced target dictionary for each feasible target, or None for infeasible targets.

Return type:

List[Union[dict, None]]

apply_fixed_comps(target: dict) dict[source]#

Apply fixed compositions to a target dictionary without overwriting existing values.

Parameters:

target (dict) – The target solution dictionary

Returns:

A new target dictionary with fixed compositions applied

Return type:

dict

prepare(target: dict, dest: str | None = None) tuple[dict, str] | tuple[None, None][source]#

Prepare the target solution. The dest argument is currently not used by this implementation.

get_transfer_params(stock_name)[source]#

Get the transfer parameters for a specific stock solution.

Parameters:

stock_name (str) – Name of the stock solution

Returns:

Dictionary of transfer parameters to pass to transfer()

Return type:

dict

reorder_protocol(protocol)[source]#

Reorder the protocol based on stock_mix_order if specified

Parameters:

protocol (list) – List of PipetteAction objects

Returns:

Reordered list of PipetteAction objects

Return type:

list

reset()[source]#

Reset the driver state/configuration.