bellini.devices.LiquidTransfer

class bellini.devices.LiquidTransfer(name, var, noise_model='Normal')[source]

Bases: bellini.devices.ActionableDevice

Transfer an amount of liquid from one container to another with specified error

__init__(name, var, noise_model='Normal')[source]
Parameters
  • name (str) – Name of the LiquidTransfer device. Will be used in assigning names to each volume transfer sample

  • var (Quantity (volume units)) – Error in volume drawn

  • noise_model (str, default=”Normal”) – Noise model that LiquidTransfer uses. Choices include “Normal”, “TruncatedNormal”, “LogNormal”, and None.

  • TODO (allow variance to be drawn from a prior)

Methods

__init__(name, var[, noise_model])

Parameters
  • name (str) -- Name of the LiquidTransfer device. Will be used in assigning names

apply(source, sink, volume)

Transfer volume from source to sink

apply_state(experiment_state, source_ref, ...)

Transfer volume from source_ref in experimental_state to sink_ref in experimental_state

apply(source, sink, volume)[source]

Transfer volume from source to sink

Parameters
  • source (Container (not empty)) – Container the aliquot is drawn from

  • sink (Container) – Container the aliquot is placed in

  • volume (Quantity or Distribution (volume units)) – Amount to transfer

Returns

  • new_source (Container) – source after the aliquot has been removed

  • new_sink (Container) – sink after the aliquot has been removed

apply_state(experiment_state, source_ref, sink_ref, volume)[source]

Transfer volume from source_ref in experimental_state to sink_ref in experimental_state

Parameters
  • experimental_state (dict) – Current experimental state

  • source_ref (Reference) – Reference to Container the aliquot is drawn from

  • sink_ref (Reference) – Reference to Container the aliquot is placed in

  • volume (Quantity or Distribution (volume units)) – Amount to transfer

Returns

  • new_experiment_state (dict) – Experimental state after volume transfer

  • belief_graph (dict) – dict of (current experimental object) -> (all dependent previous experimental objects)