Skip to content

Liquid

This module contains the LiquidHandler class.

CLASS DESCRIPTION
LiquidHandler

Liquid handler base class

Documentation last updated: 2025-02-22

LiquidHandler

LiquidHandler(*, verbose: bool = False, **kwargs)

Liquid handler base class

ATTRIBUTE DESCRIPTION
device

Device object

TYPE: Device | StreamingDevice

flags

Flags for the class

TYPE: SimpleNamespace

speed_in

Speed for aspiration

speed_out

Speed for dispense

reagent

Name of reagent

offset

Offset for liquid handling

connection_details

Connection details for the device

TYPE: dict

is_busy

Whether the device is busy

TYPE: bool

is_connected

Whether the device is connected

TYPE: bool

verbose

Verbosity of class

TYPE: bool

capacity

Capacity of liquid handler

TYPE: float

channel

Current channel of liquid handler

TYPE: float

volume

Current volume of liquid in the channel

TYPE: float

volume_resolution

Volume resolution of liquid handler

TYPE: float

METHOD DESCRIPTION
connect

Connect to the device

disconnect

Disconnect from the device

resetFlags

Reset all flags to to default

shutdown

Shutdown procedure for tool

aspirate

Aspirate desired volume of reagent

blowout

Blowout liquid from tip

dispense

Dispense desired volume of reagent

pullback

Pullback liquid from tip

cycle

Cycle between aspirate and dispense

empty

Empty the channel

fill

Fill the channel

rinse

Rinse the channel with aspirate and dispense cycles

Instantiate the class

PARAMETER DESCRIPTION
verbose

verbosity of class. Defaults to False.

TYPE: bool DEFAULT: False

capacity property writable

capacity: float

Capacity of liquid handler

channel property writable

channel: float

Current channel of liquid handler

connection_details property

connection_details: dict

Connection details for the device

is_busy property

is_busy: bool

Whether the device is busy

is_connected property

is_connected: bool

Whether the device is connected

verbose property writable

verbose: bool

Verbosity of class

volume property writable

volume: float

Current volume of liquid in the channel

volume_resolution property writable

volume_resolution: float

Volume resolution of liquid handler

__enter__

__enter__()

Context manager enter method

__exit__

__exit__(exc_type, exc_value, traceback)

Context manager exit method

aspirate

aspirate(
    volume: float,
    speed: float | None = None,
    reagent: str | None = None,
    *,
    pullback: bool = False,
    delay: int = 0,
    pause: bool = False,
    ignore: bool = False,
    **kwargs,
) -> bool

Aspirate desired volume of reagent

PARAMETER DESCRIPTION
volume

target volume

TYPE: float

speed

speed to aspirate at. Defaults to None.

TYPE: float | None DEFAULT: None

reagent

name of reagent. Defaults to None.

TYPE: str | None DEFAULT: None

pullback

whether to pullback after aspirate. Defaults to False.

TYPE: bool DEFAULT: False

delay

time delay after aspirate. Defaults to 0.

TYPE: int DEFAULT: 0

pause

whether to pause for user intervention. Defaults to False.

TYPE: bool DEFAULT: False

ignore

whether to aspirate reagent regardless. Defaults to False.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
bool

whether the action is successful

TYPE: bool

blowout

blowout(**kwargs) -> bool

Blowout liquid from tip

RETURNS DESCRIPTION
bool

whether the action is successful

TYPE: bool

connect

connect()

Connect to the device

cycle

cycle(
    volume: float,
    speed: float | None = None,
    reagent: str | None = None,
    cycles: int = 1,
    *,
    delay: int = 0,
    **kwargs,
) -> bool

Cycle between aspirate and dispense

PARAMETER DESCRIPTION
volume

target volume

TYPE: float

speed

speed to aspirate and dispense at. Defaults to None.

TYPE: float | None DEFAULT: None

reagent

name of reagent. Defaults to None.

TYPE: str | None DEFAULT: None

cycles

number of cycles. Defaults to 1.

TYPE: int DEFAULT: 1

delay

time delay after each action. Defaults to 0.

TYPE: int DEFAULT: 0

RETURNS DESCRIPTION
bool

whether the action is successful

TYPE: bool

disconnect

disconnect()

Disconnect from the device

dispense

dispense(
    volume: float,
    speed: float | None = None,
    *,
    blowout: bool = False,
    delay: int = 0,
    pause: bool = False,
    ignore: bool = False,
    **kwargs,
) -> bool

Dispense desired volume of reagent

PARAMETER DESCRIPTION
volume

target volume

TYPE: float

speed

speed to dispense at. Defaults to None.

TYPE: float | None DEFAULT: None

blowout

whether perform blowout. Defaults to False.

TYPE: bool DEFAULT: False

delay

time delay after dispense. Defaults to 0.

TYPE: int DEFAULT: 0

pause

whether to pause for user intervention. Defaults to False.

TYPE: bool DEFAULT: False

ignore

whether to dispense reagent regardless. Defaults to False.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
bool

whether the action is successful

TYPE: bool

empty

empty(
    speed: float | None = None,
    *,
    blowout: bool = False,
    delay: int = 0,
    pause: bool = False,
    **kwargs,
) -> bool

Empty the channel

PARAMETER DESCRIPTION
speed

speed to empty. Defaults to None.

TYPE: float | None DEFAULT: None

blowout

whether to perform blowout. Defaults to False.

TYPE: bool DEFAULT: False

delay

delay time between steps in seconds. Defaults to 0.

TYPE: int DEFAULT: 0

pause

whether to pause for user intervention. Defaults to False.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
bool

whether the action is successful

TYPE: bool

fill

fill(
    speed: float | None = None,
    reagent: str | None = None,
    *,
    pullback: bool = False,
    cycles: int = 0,
    delay: int = 0,
    pause: bool = False,
    **kwargs,
) -> bool

Fill the channel

PARAMETER DESCRIPTION
speed

speed to aspirate and dispense at. Defaults to None.

TYPE: float | None DEFAULT: None

reagent

name of reagent. Defaults to None.

TYPE: str | None DEFAULT: None

pullback

whether to pullback after aspirate. Defaults to False.

TYPE: bool DEFAULT: False

cycles

number of cycles before filling. Defaults to 0.

TYPE: int DEFAULT: 0

delay

time delay after each action. Defaults to 0.

TYPE: int DEFAULT: 0

pause

whether to pause for user intervention. Defaults to False.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
bool

whether the action is successful

TYPE: bool

pullback

pullback(**kwargs) -> bool

Pullback liquid from tip

RETURNS DESCRIPTION
bool

whether the action is successful

TYPE: bool

resetFlags

resetFlags()

Reset all flags to class attribute _default_flags

rinse

rinse(
    speed: float | None = None,
    reagent: str | None = None,
    cycles: int = 3,
    *,
    delay: int = 0,
    **kwargs,
) -> bool

Rinse the channel with aspirate and dispense cycles

PARAMETER DESCRIPTION
speed

speed to aspirate and dispense at. Defaults to None.

TYPE: float | None DEFAULT: None

reagent

name of reagent. Defaults to None.

TYPE: str | None DEFAULT: None

cycles

number of cycles. Defaults to 1.

TYPE: int DEFAULT: 3

delay

time delay after each action. Defaults to 0.

TYPE: int DEFAULT: 0

RETURNS DESCRIPTION
bool

whether the action is successful

TYPE: bool

shutdown

shutdown()

Shutdown procedure for tool