From 1b5ca00d44002a86fbfb9cd06915b2e127d900a1 Mon Sep 17 00:00:00 2001 From: sldesnoo-Delft <s.l.desnoo@tudelft.nl> Date: Thu, 21 Mar 2024 12:11:01 +0100 Subject: [PATCH] Log warning when sequence run duration > 3 s --- pulse_lib/keysight/M3202A_uploader.py | 5 +++++ pulse_lib/keysight/qs_uploader.py | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/pulse_lib/keysight/M3202A_uploader.py b/pulse_lib/keysight/M3202A_uploader.py index 0adf5598..56193ead 100644 --- a/pulse_lib/keysight/M3202A_uploader.py +++ b/pulse_lib/keysight/M3202A_uploader.py @@ -249,6 +249,8 @@ class M3202A_Uploader: if channels is None: channels = list(job.n_acq_samples.keys()) sample_rate = job.acquisition_conf.sample_rate + if job.acquisition.f_sweep is not None: + raise Exception("In-sequence resonator frequency sweep not supported for Keysight") for channel_name, t_measure in job.t_measure.items(): if channel_name not in channels: continue @@ -454,6 +456,9 @@ class M3202A_Uploader: schedule_params = self._get_hvi_params(job) job.hw_schedule.set_configuration(schedule_params, job.n_waveforms) n_rep = job.n_rep if job.n_rep else 1 + run_duration = n_rep * job.playback_time * 1e-9 + 0.1 + if run_duration > 3.0: + logger.warning(f"Expected duration for point: {run_duration:.1f} s") job.hw_schedule.start(job.playback_time, n_rep, schedule_params) if release_job: diff --git a/pulse_lib/keysight/qs_uploader.py b/pulse_lib/keysight/qs_uploader.py index 99449257..6239c483 100644 --- a/pulse_lib/keysight/qs_uploader.py +++ b/pulse_lib/keysight/qs_uploader.py @@ -331,6 +331,9 @@ class QsUploader: sample_rate = None else: sample_rate = job.acquisition_conf.sample_rate + if job.acquisition.f_sweep is not None: + raise Exception("In sequence resonator frequency sweep not supported for Keysight") + for channel_name, t_measure in job.t_measure.items(): if channel_name not in channels: continue @@ -620,6 +623,9 @@ class QsUploader: schedule_params = self._get_hvi_params(job) job.hw_schedule.set_configuration(schedule_params, job.n_waveforms) n_rep = job.n_rep if job.n_rep else 1 + run_duration = n_rep * job.playback_time * 1e-9 + 0.1 + if run_duration > 3.0: + logger.warning(f"Expected duration for point: {run_duration:.1f} s") job.hw_schedule.start(job.playback_time, n_rep, schedule_params) if release_job: -- GitLab