Beispiel #1
0
#time.sleep(1)

## run
N = 1
start = time.perf_counter()
for i in range(N):
    sequencer.upload(index=[0])
    sequencer.play(index=[0])
    time.sleep(1.0)

    data = dig.measure.get_data()
duration = time.perf_counter() - start
print(f'duration {duration*1000/N:5.1f} ms')

print_fpga_log(dig.SD_AIN)
for awg in awgs:
    print(f'AWG: {awg.name}')
    print_fpga_log(awg.awg, clock200=True)

dig_data = [None] * 4
index = 0
for ch in dig_channels:
    c = ch - 1
    dig_data[c] = data[index].flatten()
    index += 1
    print(f'ch{ch}: {len(dig_data[c])}')

### plots
#colors = ['k', 'b','r', 'c', 'y']
#colors = ['k', 'tab:blue', 'k', 'yellow', 'tomato']
Beispiel #2
0
)

sequencer.upload(index=[0])
for ch, mode in dig_channel_modes.items():
    dig.set_channel_acquisition_mode(ch, mode)
    dig.set_channel_properties(ch, full_scale)
    dig.set_daq_settings(ch,
                         n_rep,
                         t_measure,
                         downsampled_rate=1e9 / t_average,
                         power2decimation=p2decim)

sequencer.play(index=[0])
data = dig.measure.get_data()

print_fpga_log(dig.SD_AIN)
#for awg in awgs:
#    print(f'AWG: {awg.name}')
#    print_fpga_log(awg.awg, clock200=True)

dig_data = [None] * 4
for ch in dig_channel_modes:
    c = ch - 1
    dig_data[c] = data[c].flatten()
    print(f'ch{ch}: {len(dig_data[c])}')

### plots
#colors = ['k', 'b','r', 'c', 'y']
#colors = ['k', 'tab:blue', 'k', 'yellow', 'tomato']
colors = ['k', 'tab:blue', 'tab:orange', 'tab:green', 'tab:red']