sknrf.device.base module

sknrf.device.base.device_logger(logger)
class sknrf.device.base.AbstractDevice(devices_model, port, config_filename='', **kwargs)

Bases: object

Abstract Device driver.

Base class for all device types including:

  • Instruments:
    • LFSource.

    • LFReceiver.

    • LFZTuner.

    • RFSource.

    • RFReceiver.

    • RFZTuner.

  • Calkits.

  • DUTs

Attributes:

firmware_map (dict): Dictionary describing the supported firmware versions for each physical device. signal_list (list): List of property names that contain signal type data. transforms_list (list): List of signal transforms supported by the device driver. display_order (list): Preferred display order of device properties.

Example:

The device drive attributes could be defined as follows:

>>> firmware_map = {"device_handle_name_1": "1.3.x", "device_handle_name_2": "2.5.3"}
>>> signal_list = ["v"]
>>> transforms_list = ["Envelope", "Time", "Time Envelope", "Frequency", "Spectrum", "Power"]
>>> display_order = ["initialized", "freq", "v", "num_harmonics", "harmonics"]
device_id = 0
firmware_map = {}
signal_list = []
transforms_list = []
display_order = []
abstract connect_handles()

Connect to the devices handles and store references in the handles dictionary.

abstract preset()

Preset device handles that have have unique connections.

unique_handle(handle)

Determines if the device handle is a unique connection.

Args:

handle_name (str): device key in the handles dictionary,

Returns:

bool: True if the cooresponding device handle is a device unique connection.

disconnect_handles()
property on
property f0
property freq

ndarray: The subsection of Settings.freq available to the device driver.

property time_c

ndarray: The subsection of Settings.time_c available to the device driver.

property num_harmonics

int: The total number of harmonics available to the device driver.

property harmonics

ndarray: The actual harmonic indicies that are controlled by the device driver.

property time

ndarray: The subsection of Settings.time available to the device driver.

property freq_m

ndarray: The subsection of Settings.freq_m available to the device driver.

static time_interp(t_value)

Interpolates the user provided t_value to the nearest point in the time sweep.

Args:

t_value: user provided time.

Return:

float: interpolated t_value in the time sweep.

property period

float: Pulse Modulation period time.

arm()

Arm Trigger and Pepare for measurement

property trigger_delay
trigger()

Trigger for measurement synchronization.

measure()

Record measurement data.