utils#

Zurich Instruments LabOne Python API Utility Functions.

This module provides basic utility functions to ease the use of the native Python API zhinst-core.

Functions

api_server_version_check(daq)

Check the consistency of the used version in the LabOne stack.

assert_node_changes_to_expected_value(daq, ...)

Polls a node until it has the the expected value.

autoConnect([default_port, api_level])

Try to connect to a Zurich Instruments Data Server (UHF,HF2 only).

autoDetect(daq[, exclude])

Return one of the devices connected to the Data Server.

bw2tc(bandwidth, order)

Convert the demodulator 3 dB bandwidth to its equivalent timeconstant.

bwtc_scaling_factor(order)

Return the appropriate scaling factor for bandwidth to timeconstant.

check_for_sampleloss(timestamps)

Check for sample loss.

convert_awg_waveform(wave1[, wave2, markers])

Convert one or multiple waveforms into the native AWG waveform format.

create_api_session(device_serial, api_level)

Create an API session for the specified device.

default_output_mixer_channel(discovery_props)

Return an instrument's default output mixer channel.

devices(daq)

List of device_id of all devices connected to the Data Server.

disable_everything(daq, device)

Put the device in a known base configuration.

get_default_settings_path(daq)

Return the default path used for settings by the ziDeviceSettings module.

load_labone_csv(fname)

Load a csv file generated from LabOne.

load_labone_demod_csv(fname[, column_names])

Load a CSV file containing demodulator samples.

load_labone_mat(filename)

Load a mat file generated from LabOne.

load_settings(daq, device, filename)

Load a LabOne settings file to the specified device.

load_zicontrol_csv(filename[, column_names])

Load a CSV file containing demodulator samples.

load_zicontrol_zibin(filename[, column_names])

Load a ziBin file containing demodulator samples.

parse_awg_waveform(wave_uint[, channels, ...])

Covert a native AWG waveform into the individual waves.

save_settings(daq, device, filename)

Save settings from the specified device to a LabOne settings file.

sigin_autorange(daq, device, in_channel)

Perform an automatic adjustment of the signal input range.

systemtime_to_datetime(systemtime)

Convert the LabOne "systemtime" into a datetime object.

tc2bw(timeconstant, order)

Convert the demodulator timeconstant to its equivalent 3 dB bandwidth.

volt_rms_to_dbm(volt_rms[, input_impedance_ohm])

Converts a Root Mean Square (RMS) voltage into a dBm power value.

wait_for_state_change(daq, node, value[, ...])

Waits until a node has the expected state/value.