AFL.automation.mixing.BioSANSPrepare#

Functions

listify(obj)

Classes

Any(*args, **kwargs)

Special type indicating an unconstrained type.

BioSANSPrepare([overrides])

Driver(name[, defaults, overrides, useful_links])

MassBalance([name, minimum_volume])

MassBalanceDriver([overrides])

MockEICClient(*args, **kwargs)

Minimal mock EIC client for testing and mock_mode.

PersistentConfig(path[, defaults, ...])

A dictionary-like class that serializes changes to disk

class AFL.automation.mixing.BioSANSPrepare.BioSANSPrepare(overrides=None)[source]#
defaults = {'beamline': 'CG3', 'catch_volume': '10 ul', 'cfenable_timeout_s': 1800.0, 'eic_token': '1', 'exposure': 600, 'fixed_compositions': {}, 'ipts_number': '1234', 'mixing_locations': [], 'mock_mode': False, 'stocks': []}#
__init__(overrides=None)[source]#
status()[source]#

Get the status of the BioSANSPrepareDriver.

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.

blockForTableScan()[source]#

Block until the last submitted table scan is complete.

reset()[source]#

Reset the driver state/configuration.

property client#

Property that returns the EIC client instance.

If the client doesn’t exist yet, it instantiates a new EICClient using the token and beamline from the configuration.

Returns:

The client instance for communicating with the instrument.

Return type:

EICClient

make_stock_pv_map()[source]#

Make a map of the stock locations to the stock solutions.

set_pv(pv_name, value, timeout=10, wait=True)[source]#
get_pv(pv_name, timeout=10)[source]#
advanceSample(**kwargs)#

Default no-op handler for injected commands.

calibrate_sensor(**kwargs)#

Default no-op handler for injected commands.

home(**kwargs)#

Default no-op handler for injected commands.

loadSample(**kwargs)#

Default no-op handler for injected commands.

rinseCell(**kwargs)#

Default no-op handler for injected commands.

transfer(**kwargs)#

Default no-op handler for injected commands.

transfer_to_catch(**kwargs)#

Default no-op handler for injected commands.