Skip to content

Commit

Permalink
Merge pull request #88 from sldesnoo-Delft/KeysightM3202A
Browse files Browse the repository at this point in the history
Keysight m3202a - Fix
  • Loading branch information
jenshnielsen authored Jan 4, 2021
2 parents bc40e8d + e313726 commit f461da8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,15 +445,16 @@ def _init_awg_memory(self):
self.log.info(f'Reserving awg memory for {len(new_slots)} slots')

zeros = []
wave = None
total_size = 0
total_duration = 0
for slot in new_slots:
start = time.perf_counter()
if len(zeros) != slot.size:
if len(zeros) != slot.size or wave is None:
zeros = np.zeros(slot.size, np.float)
wave = keysightSD1.SD_Wave()
result_parser(wave.newFromArrayDouble(keysightSD1.SD_WaveformTypes.WAVE_ANALOG, zeros))
super().load_waveform(wave, slot.number)
super().load_waveform(wave, slot.number)
duration = time.perf_counter() - start
total_duration += duration
total_size += slot.size
Expand Down

0 comments on commit f461da8

Please sign in to comment.