From 307915cf8551aba9a892a5ad27c397abc418061a Mon Sep 17 00:00:00 2001 From: Phililp Kim Date: Sat, 14 Jun 2025 13:22:59 -0500 Subject: [PATCH] Added support for acquisition of data from acquire_decimated --- labcore/instruments/qick/qick_sweep_v2.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/labcore/instruments/qick/qick_sweep_v2.py b/labcore/instruments/qick/qick_sweep_v2.py index c6142b0..b254e45 100755 --- a/labcore/instruments/qick/qick_sweep_v2.py +++ b/labcore/instruments/qick/qick_sweep_v2.py @@ -49,6 +49,10 @@ class PulseVariable(DataSpec): class TimeVariable(DataSpec): time_parameter: str = None +@dataclass +class DecimatedVariable(DataSpec): + ro_index: int = None + class QickBoardSweep(AsyncRecord): @@ -98,7 +102,10 @@ def collect(self, *args, **kwargs): sweepIdx = 0 # To specify the index of the sweep variable to return for ds in self.specs: if isinstance(ds, ComplexQICKData): - return_data[ds.name]= data[measIdx].dot([1,1j]) + if any(isinstance(dss, DecimatedVariable) for dss in self.specs): + return_data[ds.name]=data[:].dot([1,1j]) + else: + return_data[ds.name]= data[measIdx].dot([1,1j]) measIdx += 1 elif isinstance(ds, PulseVariable): return_data[ds.name]= self.communicator["qick_program"].get_pulse_param(ds.pulse_parameter, ds.sweep_parameter, as_array=True) @@ -106,6 +113,9 @@ def collect(self, *args, **kwargs): elif isinstance(ds, TimeVariable): return_data[ds.name]= (self.communicator["qick_program"].get_time_param(ds.time_parameter, 't', as_array=True))*(cfg['n_echoes']+1) sweepIdx += 1 + elif isinstance(ds, DecimatedVariable): + return_data[ds.name] = self.communicator["qick_program"].get_time_axis(ro_index=ds.ro_index) + sweepIdx += 1 else: return_data[ds.name] = np.arange(cfg['steps']) sweepIdx += 1