Skip to content

Python Toolkit API Impedance Module

zhinst.toolkit.driver.modules.impedance_module.ImpedanceModule(impedance_module, session)

Bases: BaseModule

Implements a base Impedance Module for Lock-In instruments.

The Impedance Module corresponds to the Cal sub-tab in the LabOne User Interface Impedance Analyzer tab. It allows the user to perform a compensation that will be applied to impedance measurements.

For a complete documentation see the LabOne user manual

Parameters:

Name Type Description Default
impedance_module ImpedanceModule

Instance of the core Impedance Module.

required
session Session

Session to the Data Server.

required

finish()

Stop the module.

finished(step=None)

Check if the calibration or a step of it is finished.

Parameters:

Name Type Description Default
step Optional[int]

Calibration step. If not None this function checks if the specified step is finished. Otherwise it checks if the hole calibration is done.

None

Returns:

Type Description
bool

Flag if the calibration or a step is finished.

wait_done(step=None, *, timeout=20.0, sleep_time=0.5)

Waits until the specified compensation step is complete.

Parameters:

Name Type Description Default
step Optional[int]

The compensation step to wait for completion.

None
timeout float

The maximum waiting time in seconds for the compensation to complete (default: 20).

20.0
sleep_time float

Time in seconds to wait between requesting the state. (default: 0.5)

0.5

Raises:

Type Description
TimeoutError

The compensation is not completed before timeout.

zhinst.toolkit.driver.modules.impedance_module.CalibrationStatus

Bases: int, Sequence

Wrapper around a Impedance module status.

LabOne reports a status for the impedance module as integers. The integer needs to be interpreted in a binary format where each bit represents a stage within the compensation. If the bit is set it means that the step is completed.

This class wraps around this by both deriving from an integer and a Sequence. Therefore one can use it like a int but also access the individual steps through items (e.g. module.step[0]).

Parameters:

Name Type Description Default
value int

Integer value of the status.

required