Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 1.28 KB

File metadata and controls

30 lines (23 loc) · 1.28 KB

sample_number

Definition

Sample number of the voltage reading.

Attribute Value

int

Examples

The following example demonstrates the sample_number attribute. It checks if the PSMU Digitizer has finished measuring voltage data every wait_time in milliseconds, fetches its measuremments, and store thems in sample and voltage arrays to be used for plotting in a graph.

# wait for the Digitizer measurements to complete 
spikesafe_python.DigitizerDataFetch.wait_for_new_voltage_data(tcp_socket, 0.5)

# fetch the Digitizer voltage readings using VOLT:FETC? query
digitizerData = []
digitizerData = spikesafe_python.DigitizerDataFetch.fetch_voltage_data(tcp_socket)

# prepare digitizer voltage data to plot
samples = []
voltage_readings = []
for dd in digitizerData:
    samples.append(dd.sample_number)
    voltage_readings.append(dd.voltage_reading)

Examples In Action

/making_integrated_voltage_measurements/measure_voltage_across_pulse/MeasureVoltageAcrossPulse.py