Skip to content

Commit

Permalink
Merge branch 'master' into feature/Keithley_2000-SCAN
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelhohn authored Jan 15, 2021
2 parents 4350928 + f461da8 commit 05eebd2
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 05eebd2

Please sign in to comment.