diff --git a/pulse_lib/keysight/M3202A_uploader.py b/pulse_lib/keysight/M3202A_uploader.py index 6f816034e01db624a8e7e883356c6c5b9fc851f1..3c15186247fc477202f125f3a1e8a913c0e0009a 100644 --- a/pulse_lib/keysight/M3202A_uploader.py +++ b/pulse_lib/keysight/M3202A_uploader.py @@ -47,14 +47,8 @@ class M3202A_Uploader: self.jobs = [] self.acq_description = None - self._init_awgs() - self._config_marker_channels() - - def _init_awgs(self): - for awg in self.AWGs.values(): - for ch in [1,2,3,4]: - awg.awg_flush(ch) self.release_all_awg_memory() + self._config_marker_channels() def _config_marker_channels(self): for channel in self.marker_channels.values(): @@ -358,6 +352,8 @@ class M3202A_Uploader: def release_all_awg_memory(self): for awg in self.AWGs.values(): + for ch in [1,2,3,4]: + awg.awg_flush(ch) if hasattr(awg, 'release_waveform_memory'): awg.release_waveform_memory() else: @@ -971,6 +967,9 @@ class UploadAggregator: t = seg_render.t_start + acquisition.start job.n_acq_samples[ch_name] += 1 t_measure = acquisition.t_measure if acquisition.t_measure is not None else job.acquisition_conf.t_measure + # if t_measure = -1, then measure till end of sequence. (time trace feature) + if t_measure < 0: + t_measure = self.segments[-1].t_end - t if ch_name in job.t_measure: if t_measure != job.t_measure[ch_name]: raise Exception( diff --git a/pulse_lib/keysight/qs_uploader.py b/pulse_lib/keysight/qs_uploader.py index fb10cdfb0bcf44a1e6604b85ce152fee014f18ab..1b2d321393a781cd7d9164802d6675b42e6dd336 100644 --- a/pulse_lib/keysight/qs_uploader.py +++ b/pulse_lib/keysight/qs_uploader.py @@ -451,6 +451,8 @@ class QsUploader: def release_all_awg_memory(self): for awg in self.AWGs.values(): + for ch in [1,2,3,4]: + awg.awg_flush(ch) if hasattr(awg, 'release_waveform_memory'): awg.release_waveform_memory() else: @@ -1182,6 +1184,9 @@ class UploadAggregator: # set empty list. Fill later after sorting all triggers digitizer_trigger_channels[channel.module_name] = [] t_measure = acquisition.t_measure if acquisition.t_measure is not None else job.acquisition_conf.t_measure + # if t_measure = -1, then measure till end of sequence. (time trace feature) + if t_measure < 0: + t_measure = self.segments[-1].t_end - t if channel_name in job.t_measure: if t_measure != job.t_measure[channel_name]: raise Exception( @@ -1263,6 +1268,9 @@ class UploadAggregator: t_measure = acquisition.t_measure else: t_measure = job.acquisition_conf.t_measure + # if t_measure = -1, then measure till end of sequence. (time trace feature) + if t_measure < 0: + t_measure = self.segments[-1].t_end - t if job.acquisition_conf.sample_rate is not None: period_ns = iround(1e8/job.acquisition_conf.sample_rate) * 10 n_cycles = int(t_measure / period_ns)