lab_driver.charac_dac#

Module Contents#

Classes#

SettingsDAC

Class with settings for testing the DUT of Digital-Analog-Converter (DAC) Attributes: system_id: String with system name or ID dac_reso: Integer with bit resolution of DAC dac_chnl: List with DAC channel IDs to test (like: [idx for idx in range (16)]) dac_rang: List with [min, max] digital ranges for testing the N-bit DAC (like: [0, 65535]) daq_ovr: Integer number for oversampling of DAQ system num_rpt: Integer of completes cycles to run DAQ num_steps: Integer of intermediate steps in ramping sleep_sec: Sleeping seconds between each DAQ setting

CharacterizationDAC

Data#

API#

class lab_driver.charac_dac.SettingsDAC[source]#

Class with settings for testing the DUT of Digital-Analog-Converter (DAC) Attributes: system_id: String with system name or ID dac_reso: Integer with bit resolution of DAC dac_chnl: List with DAC channel IDs to test (like: [idx for idx in range (16)]) dac_rang: List with [min, max] digital ranges for testing the N-bit DAC (like: [0, 65535]) daq_ovr: Integer number for oversampling of DAQ system num_rpt: Integer of completes cycles to run DAQ num_steps: Integer of intermediate steps in ramping sleep_sec: Sleeping seconds between each DAQ setting

system_id: str#

None

dac_reso: int#

None

dac_chnl: list#

None

dac_rang: list#

None

daq_ovr: int#

None

num_rpt: int#

None

num_steps: int#

None

sleep_sec: float#

None

static get_date_string() str[source]#

Function for getting the datetime in string format

get_num_steps() int[source]#

Function for getting the number of steps in testing

get_cycle_stimuli_input() numpy.ndarray[source]#

Getting the numpy array with a stimuli with sawtooth waveform

get_cycle_empty_array() numpy.ndarray[source]#

Function for generating an empty numpy array with right size

lab_driver.charac_dac.DefaultSettingsDAC#

‘SettingsDAC(…)’

class lab_driver.charac_dac.CharacterizationDAC(folder_reference: str)[source]#

Bases: lab_driver.charac_common.CharacterizationCommon

Initialization

Class for handling the measurement routine for characterising a Digital-Analog-Converter (DAC)

Parameters:

folder_reference – String with source folder to find the Main Repo Path

settings: lab_driver.charac_dac.SettingsDAC#

None

run_test_dac_transfer(func_mux, func_dac, func_daq, func_beep) dict[source]#

Function for characterizing the transfer function of the DAC

Parameters:
  • func_mux – Function for defining the pre-processing part of the hardware DUT, setting the DAC channel with inputs (chnl)

  • func_dac – Function for applying selected channel and data on DUT-DAC with input params (chnl, data)

  • func_daq – Function for sensing the DAC output with external multimeter device

  • func_beep – Function for do a beep in DAQ

Returns:

Dictionary with [‘stim’: input test signal of one repetition, ‘settings’: Settings, ‘ch’: DAQ results with ‘val’ and ‘std’]

plot_characteristic_results_from_file(path: str, file_name: str) None[source]#

Function for plotting the loaded data files

Parameters:
  • path – Path to the numpy files with DAQ results

  • file_name – Name of numpy array with DAQ results to load

Returns:

None

plot_characteristic_results_direct(data: dict, file_name: str, path: str) None[source]#

Function for plotting the loaded data files

Parameters:
  • data – Dictionary with measurement data [‘stim’, ‘ch’, …]

  • path – Path to measurement in which the figures are saved

  • file_name – Name of figure file to save

Returns:

None